Python - Programming Language
This course covers the basics of programming in Python. Work your way through the videos/articles and I'll teach you everything you need to know to start your programming journey!

Better Calculator

Lesson 18
Author : GOUP
Last Updated : September, 2020


Code

Copynum1 = int(input("num1: "))
op = input("Operator: ")
num1 = int(input("num1: "))

if op == "+":
     print(num1 + num2)
elif op == "-":
     print(num1 - num2)
elif op == "/":
     print(num1 / num2)
elif op == "*":
     print(num1 * num2)
else:
     print("Invalid Operator")