+ 1

What will be the answer of print (20//6.0) and what is the Intermediate steps..?

23rd Sep 2018, 6:10 AM
Baba Ji
Baba Ji - avatar
3 odpowiedzi
+ 1
20/6.0 = 3.0 with remainder 2 so answer is 3.0
23rd Sep 2018, 6:43 AM
davy hermans
davy hermans - avatar
+ 1
True if 6 is integer. 20/6 = 3.333333... 20//6 = 3 20//6.0 = 3.0
23rd Sep 2018, 6:50 AM
davy hermans
davy hermans - avatar
0
but I read somewhere that // removes the float.
23rd Sep 2018, 6:45 AM
Baba Ji
Baba Ji - avatar