0

How to float result?

As mentioned in the app, 8/2=4.0 But i get 4..! Why is it??

23rd Jul 2016, 5:21 AM
Asutosh Rout
Asutosh Rout - avatar
2 Réponses
0
If you want an integer division, use // instead of /. / is now a float division in Python 3.
23rd Jul 2016, 3:27 PM
Gershon Fosu
Gershon Fosu - avatar
- 1
3.x
23rd Jul 2016, 10:09 AM
Hardik Baraiya
Hardik Baraiya - avatar