From 00769c24469072a4c182a4483da2fd6f8c1926cb Mon Sep 17 00:00:00 2001 From: Swarup Bhanja Chowdhury <55395995+swarupbhanjachowdhury@users.noreply.github.com> Date: Tue, 27 Oct 2020 17:14:18 +0530 Subject: [PATCH] Create python CLI Calculator for Hactoberfist 2020, open source CLI python calculator --- python CLI Calculator | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 python CLI Calculator diff --git a/python CLI Calculator b/python CLI Calculator new file mode 100644 index 0000000..91b6afe --- /dev/null +++ b/python CLI Calculator @@ -0,0 +1,23 @@ +print("\nWelcome to This Calculator, Developed By Swarup :)\n") +print("Please Choose Your Calculation type, and enter type (ex + - *)") +print("\n Enter + for Addition \n Enter - for subtraction \n Enter / for division \n Enter * for multiplication \n") +choice = input("Please Enter Your Choice ->> ") +print("\n") +num1 = int(input("Please enter the 1st number - ")) +num2 = int(input("Please enter the 2nd number - ")) +print("\n") +if choice == "+": + num4 = num1 + num2 + print(" Your answer is = " + str(num4)) +elif choice == "-": + num4 = num1 - num2 + print(" Your answer is = " + str(num4)) +elif choice == "/": + num4 = num1 / num2 + print(" Your answer is = " + str(num4)) +elif choice == "*": + num4 = num1 * num2 + print(" Your answer is = " + str(num4)) +else: + print("\n Out of range/ Error \n") + print("Thank you for using our deshi calculator ;) visit again.")