0
Why is it not taking the float values as input it's only taking integer values ??
3 Antworten
+ 5
Sura Rawat, may be you want to use the sum of the numbers in your code? in this case the sum has to be stored in a variable. Anyway, it makes it difficult to asume what is your intend by only getting a small piece of code.
+ 1
can you show an example in code? how are you doing it and what language?
0
This is a part of code and it's not taking a float value and sorry for the above post it's my first time trying python.
>>> float(input("Enter a number: ")) + float(input("Enter another number: "))
Enter a number: 40
Enter another number: 2
42.0