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 : 🦒
Last Updated : October, 2017


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")