float(input("Enter a number: ")) + float(input("Enter another number: ")) Enter a number: 40 Enter another number: 2
4/15/2019 6:29:16 AM
Abdul Sultan7 Answers
New AnswerAbdul Sultan Yes its not giving any errors just use print statement to print the sum of numbers. print(float(input("Enter a number: ")) + float(input("Enter another number: ")))
Abdul Sultan if you are doing that in python then try this way. a=float(input("Enter a number: ")) b=float(input("Enter another number: ")) c=a+b print(c)
GAWEN STEASY I actually expected no error because that code is from a python lesson under #type-conversion.
Bro it is simple when u input u type (3 4) So this input is taken as a string So u must input (3 4) i.e input a no and press enter or leave a line then input 2nd no
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message