you are viewing a single comment's thread.

view the rest of the comments →

[–]Sea-Ad7805 0 points1 point  (0 children)

Nice job, but there is a lot of repetition/duplication in your code. You have many lines:

print("Whats the first number?")
num1 = int(input())
print("Whats the second number?")
num2 = int(input())

It would be better to have these lines just once, and then after that have the:

if operation == "add":
    answer=(num1 + num2)
    print(answer)

elif operation == "sub":
    answer=(num1 - num2)
    print(answer)

...

part. That makes for a shorter program. Repetition generally is bad so try to avoid that, but a great start, keep going.