3/4 shows me 0 y? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

3/4 shows me 0 y?

26th Jun 2017, 1:52 PM
FoxyYT 2
FoxyYT 2 - avatar
5 Answers
+ 5
are you sure thats python?
26th Jun 2017, 1:55 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 4
Python 2.x assumes the division sign to carry out division operations based on data types - floor for integers and float for floating point numbers. Python 3.x allows you to force the division type - single / represents float division and double // - floor division, regardless the data types of the divided numbers.
26th Jun 2017, 9:22 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
python27
26th Jun 2017, 1:56 PM
FoxyYT 2
FoxyYT 2 - avatar
0
maybe you used "//" instead of "/"... this "//" calculate integer division (cast the result to be an integer)
26th Jun 2017, 2:27 PM
2_3rr0r5
2_3rr0r5 - avatar
0
kk ty
26th Jun 2017, 2:39 PM
FoxyYT 2
FoxyYT 2 - avatar