+ 1
I did not get the float
5 Respostas
+ 4
Float is similar to a decimal number.
For example:
7.2 is a decimal number
5.0 is also a float because it has the potential to have decimals.
Whole numbers are considered to be integers -> int.
So an example of int function is
10 / 4 = 2
2, the result is an integer
An example of float:
10//4 = 2.5
2.5 is a float
I understand your confusion as I also struggled with these concepts when I started.
+ 2
➵Chloe[she/her] [DMs Open] [K-POP stan]
You are exactly correct!
Thanks for pointing that out
😁👍
0
Rik Wittkopp I'm not entirely sure, but I think you mixed up integer divide and regular divide, the first one returns a float whereas the second one returns an integer.
https://code.sololearn.com/caRN5rgtq4c5/?ref=app