Share your repls and programming experiences

← Back to all posts
addition calculator
Ekacta (1)

this is my first ever python code, i followed a youtube tutorial. if you want to follow it this is the link: https://www.youtube.com/watch?v=HBbrSDGGOkw

Comments
hotnewtop
PogNarwhals (0)

Very good start! If you would like to add more operations, here is a simple code to do so.

if s == 'add':
print(float(num1) + float(num2))
elif s == 'sub':
print(float(num1) - float(num2))

etc :)

Ekacta (1)

@PogNarwhals thank you! i was trying to do something like that but i didn't know how.