Jan-09-2019, 12:46 AM
Hi,
I am currently learning Python from an online course and today is my first day. I am a little confused on Integers when dividing instead of adding.
If I write
Thanks
I am currently learning Python from an online course and today is my first day. I am a little confused on Integers when dividing instead of adding.
If I write
print ((1 + 2) + 5)I get the answer 8 as an Integer but If I write
print ((1 + 2) * 5 / 3)I get 5.0 instead of 5, why does the output give me an float instead of an Integer when I divide?
Thanks