http://snippets.bentasker.i2p/posts/python3/scale-a-list-of-numbers-down-proportionally.html
= 0 ): t = n2 ; n2 = n1 % n2 ; n1 = t ; return n1 Usage Example nums = [ 2 , 4 , 6 , 8 ] print ( scale_list_proportionally ( nums )) #([1, 2, 3, 4], 2) nums = [ 250 , 5000 , 120 , 420 ] print ( scale_list_proportionally ( nums )) #([125, 2500, 60, 210], 10) nums = [ 14 , 49 , 21 , 28 ] print ( scale_list_proportionally ( nums )) # ([7, 24, 10, 14], 7) nums = [ 3 , 5 , 7 , 6 ] print ( scale_list_proportionally ( nums )) #([3, 5, 7, 6], 1) gcm hcf proportion...