From 142a3f92f6cb76bfb2ff563c43b259e7244a3851 Mon Sep 17 00:00:00 2001 From: tusharpatil96 <56131161+tusharpatil96@users.noreply.github.com> Date: Wed, 9 Oct 2019 16:20:39 +0100 Subject: [PATCH] Create Calculator_In_Python This Calculator is made with Basic python which will help you to understand Python with more ease. --- calculator _In_Python | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 calculator _In_Python diff --git a/calculator _In_Python b/calculator _In_Python new file mode 100644 index 0000000..aad9a5b --- /dev/null +++ b/calculator _In_Python @@ -0,0 +1,31 @@ +print("Calculator") +print("1.Add") +print("2.Substract") +print("3.Multiply") +print("4.Divide") + +# input choice +ch=int(input("Enter Choice(1-4): ")) + +if ch==1: + a=int(input("Enter A:")) + b=int(input("Enter B:")) + c=a+b + print("Sum = ",c) +elif ch==2: + a=int(input("Enter A:")) + b=int(input("Enter B:")) + c=a-b + print("Difference = ",c) +elif ch==3: + a=int(input("Enter A:")) + b=int(input("Enter B:")) + c=a*b + print("Product = ",c) +elif ch==4: + a=int(input("Enter A:")) + b=int(input("Enter B:")) + c=a/b + print("Quotient = ",c) +else: + print("Invalid Choice")