r/learnpython • u/Elegant_Rise356 • Oct 22 '26
I'm trying to make a basic calculator in python but I can figure out what I'm doing wrong
Here is my code if you can figure it out pls help
print ("Caculator")
print ("Addition, only")
print ()
no1 = input ("Enter 1st Number: ")
no2 = input ("Enter 2nd Number: ")
print ()
print ("Answer")
print (no1, "+", no2, "=", no1 + no2)
3
1
0
u/AlexMTBDude Oct 22 '26
When you ask questions like these you need to tell us what goes wrong, meaning what error message are you getting, or what is not working as it should. Otherwise it's very hard to help you.
0
u/Expensive-Bear-1376 Oct 23 '26
Not really hard, but yes, they absolutely should've told us what problem they observed, and nobody should've answered before that has been supplied.
12
u/Anxious_Signature452 Oct 22 '26
You need to covert strings to numbers. Ints probably.
print (no1, "+", no2, "=", int(no1) + int(no2))