I can't get it to add the two input together without literally putting them next to each other. Can you guys help? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I can't get it to add the two input together without literally putting them next to each other. Can you guys help?

number1=input() number2=input() print (number1 + number2)

28th Aug 2023, 2:15 PM
Gohan
1 Answer
+ 7
If we input anything from the user then by default input is in the string so you need to convert the string into integer like that: number1 = int(input)
28th Aug 2023, 2:20 PM
Sakshi
Sakshi - avatar