Ask your own question, for FREE!
Computer Science 9 Online
OpenStudy (anonymous):

in python, why does ratio= a/b print ratio ---this part and print a/b give different results?

OpenStudy (e.mccormick):

What version of Python are you using?

ganeshie8 (ganeshie8):

``` >>> ratio = 10/5 >>> print ratio 2 >>> print 10/5 2 ```

ganeshie8 (ganeshie8):

for me both are giving same output

OpenStudy (anonymous):

iim using python2.54 and i was referring to things like 2/3

OpenStudy (e.mccormick):

In 2.54, both of those should print 0.

OpenStudy (e.mccormick):

If they are 2/3 that is.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!