+ 1
is the dividing and float thing different in 2.7.10?
because when im in the Python 2.7.10 Shell and i use (4+8)/3 i dont get a float answer i get 6
5 Respostas
+ 2
in python 2.7
u don't need to put print(7)
u can directly do print 7
7/2=3
4/3=1
4.0/3=1.33
4/3.0=1.33
4.0/3.0=1.33
also this is //floor division gives integer
python3.3
4/3
1.33
4//3=1 // is floor division
+ 1
well yes. use (4+6)/5.0 to get 2.0 in 2.7.3.
0
"/" using this operator for the expression above u will get the quotient as the answer, It will be 4.! 6
0
what does 4.! 6 mean?
0
and i thought this tutorial just literally said (4+8)/3 is 6.0