+ 1
Why does the following code gives me output (5.0) of float type while I has given input of int type
Print(10/5)
2 Answers
+ 5
In Python, / is float division. Using it will always result in a float value. If you want integer division, use //
print(10//5)
+ 1
Thanx for explaining