- 1

Why it display 6.0 and not 6

21st Feb 2017, 2:26 PM
AYUSH PRAKASH
AYUSH PRAKASH - avatar
4 odpowiedzi
+ 5
because python silently convert integer into float. you can specify the variabel with int so it doesn't result in float
21st Feb 2017, 2:50 PM
Agus Mei
Agus Mei - avatar
+ 5
you are welcome
21st Feb 2017, 2:59 PM
Agus Mei
Agus Mei - avatar
0
ok thanks
21st Feb 2017, 2:57 PM
AYUSH PRAKASH
AYUSH PRAKASH - avatar
0
use int() function to convert float to an integer
21st Feb 2017, 4:00 PM
G.S.N.V. Suraj
G.S.N.V. Suraj - avatar