0
How did he get this answer
>>> float(input("Enter a number: ")) + float(input("Enter another number: ")) Enter a number: 40 Enter another number: 2 42.0
2 Respostas
+ 4
This is because float type will print values with decimals, even if the result doesn't require one.
In this case you can do:
int(input("enter a number")) + int(input("enter another number"))
enter a number: 40
enter another number: 2
42
0
so are u gonna enter the number at the place where it says "enter number"