0
I need some help
So i have recently started trying to learn python over java as java has started to confuse me and ive heard good things about python so i try it and its so much easier however i got confused on ((4+8)/2) because i know that comes out as 6 normally but its 6.0, have i missed something or miscalculated it either way i need some help understanding it
2 Respuestas
+ 4
the / operator returns a float, however you can use // operator to get an integer;
Eg.
((4+8)/2) = 6.0
((4+8)//2) = 6
+ 2
When you divide using the / operator, it returns a float type, which is a decimal.