From 390f71c5fe7bf33710ab15031d6c4a4feacd2438 Mon Sep 17 00:00:00 2001 From: vineet8588 Date: Fri, 19 Oct 2018 16:17:27 +0530 Subject: [PATCH] resolve issue #47 --- programs/Python/calculator.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 programs/Python/calculator.py diff --git a/programs/Python/calculator.py b/programs/Python/calculator.py new file mode 100644 index 0000000..2428a9d --- /dev/null +++ b/programs/Python/calculator.py @@ -0,0 +1,15 @@ +#Program for calculator in python +a=int(input("Enter first no.- ")) +b=int(input("Enter second no.- ")) +operator=input("Enter the operation you want to perform ") +if(operator == "+"): + print("Sum is->",a+b,end="\n") +elif(operator == "-"): + print("Difference is->",a-b,end="\n") +elif(operator == "*"): + print("Multiplication is->",a*b,end="\n") +elif(operator == "/"): + print("Division is->",a/b,end="\n") + +else: + print("Invalid operator")