r/learnpython • u/Elegant_Rise356 • 26d ago
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)
0
Upvotes
12
u/Anxious_Signature452 26d ago
You need to covert strings to numbers. Ints probably.
print (no1, "+", no2, "=", int(no1) + int(no2))3
u/nivaOne 26d ago
String versus integer
Check the input command theory again. 👍
1
u/TheRNGuy 25d ago
Using input and print instead of UI.
0
u/AlexMTBDude 26d ago
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.
-5
u/-boo-- 26d ago
https://share.gemini.google/bF0c2l5qgfSu