⬅︎ Back to Integer division in programming languages
Problem dividing variable of integers numbers in Python, for percentage. Solution: product between one variable by 0,1 : print(... ), SOLA/SOLB * 100 #being SOLA < SOLB Result: 0 # Solution print(... ), int(SOLA/(SOLB*1.0) *100, ("%") Blog: http://flomana.spaces.live.com/
Comment
Problem dividing variable of integers numbers in Python, for percentage. Solution: product between one variable by 0,1 :
print(... ), SOLA/SOLB * 100 #being SOLA < SOLB Result: 0 #
Solution
print(... ), int(SOLA/(SOLB*1.0) *100, ("%")
Blog: http://flomana.spaces.live.com/