string - Printing floating point number in python -


How can I print the lines of the following code, but I can get a floating point number instead of a rounded int ?

Print "Math Question:", 100 - 25 * 3% 4

Print 3 + 2 + 1 - 5 + 4% 2 - 1/4 + 6

with the division in / 2.x results in an integer if both operencies are integers or Then first put an orange in a float in a float, or __future__ from the import division .

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -