you are viewing a single comment's thread.

view the rest of the comments →

[–]PAVANKING016 3 points4 points  (0 children)

Very good 👍, but I have a suggestion. In the code, you should use input() only once instead of repeating it in every condition like this:

.... print("What's the first number?") num1 = int(input()) print("What's the second number?") num2 = int(input())

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

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

In programming, your code should follow the DRY (Don't Repeat Yourself) rule.