0
Can anyone help with simple calculator project?
8 Réponses
+ 2
well. show your code first
+ 1
x and y are holding string type value ,convert it to int first for addition Rukevwe
0
x = input(6)
y = input(3)
felix = int(x+y)
print(felix)
tried this, didn't work
0
in your code, x and y are strings. so you need to convert them into integers while your input function.
x = int(input())
y = int(input())
print(x+y)
0
still didn't work tho...
any other ideas?
0
what errors did you get?
0
it gave me 639 instead of just 9
0
Hi Rukevwe!
It's because, still you didn't remove 3 & 6 inside input function. Keep in your mind that Sololearn ide works little more different than other ides. We need to provide all inputs at one time. And prompt messages aren't working properly here.
This is what I mentioned above.
x = input()
y = input()
felix = int(x)+int(y)
print(felix)