0
In python why it is print 5.0 Instead of print 5 .When we use following condition -----> print(10/2) ?
4 Answers
+ 2
ARAVIND DUDE ,
Single slash division gives float value
Double slash gives whole number..
It is the basic thing in python
Go through the python beginners course...
+ 1
Using a single slash to divide numbers produces a decimal (or float, as itâs known in programming).
+ 1
ARAVIND DUDE
Using print(10//2) will print 5
0
Kim Jonas Cabugayan it is a int data type but. why it is printing a float datatype ?