Johan Geldenhuys wrote:
> Hi all,
> 
> What is the syntax if I want to work out what percentage 42 is out of 250?
> 

42 is x percent of 250.

(is / of) = (x / 100)

one of those formulas from school I will always remember.

(42 / 250) = (x / 100.0)
250x = 4200.0
x = 4200.0 / 250
x = 16.8%
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to