0
I have a problem with this code.
First = input("First: ") Second = input("Second: ") sum = int(First) + int(Second) print("sum " + str(sum)) I want to make a simple addition code where I can input 2 numbers and get a sum.
5 Answers
+ 2
SAWDAH SALIM
The code is working properly, what problem are you facing?
+ 1
Keep in mind that Sololearn's compiler doesn't accept real-time input. You have to enter your information all at once on separate lines, like this:
5
6
+ 1
There is no problem, but you could do that:
first = int(input("First: "))
second = int(input("Second: "))
sum = first + second
print(f"sum :{sum}")
0
My code comes out like this
First: Second: sum (your answer)
0
And the coding inspo I was using didn't have it.