Better Calculator

Lesson 18
Author : Afrixi
Last Updated : October, 2017


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!
Table of Content

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