Why is my answer in the simple phyton calculation 6.0 and not 6 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why is my answer in the simple phyton calculation 6.0 and not 6

2nd Jul 2020, 6:11 PM
Edu Abiola
4 Answers
+ 2
Because probably one of your questions are in a float form
16th Jul 2020, 7:29 PM
CS Pineapple
CS Pineapple - avatar
+ 1
Bagon is right. You can do: print(int(60 / 10)) # prints 6 (integer) Or use integer division: print(60 // 10) # also prints 6
2nd Jul 2020, 6:34 PM
Maksim
Maksim - avatar
0
Please share your code.
2nd Jul 2020, 6:14 PM
$ยข๐Žโ‚น๐”ญ!๐จ๐“
$ยข๐Žโ‚น๐”ญ!๐จ๐“ - avatar
0
Thanks for the help guys
2nd Jul 2020, 6:36 PM
Edu Abiola