The Tech Inducers
Published in

The Tech Inducers

How to make a Simple operation picking Calculator in python

Here our goal is to Make a Simple calculator in which you can pick the operations in python…

I will leave the entire code here :

import math
print(‘Welcome to calculator 2.0’)
print(“New features in calculator 2.0”)
print(“You can choose the operation you want to use “)

#starting of of the code
print(“functions you get in the Calculator”)
#different operations to use in the calculator
print(“1 if you want to add”)
print(“3 if you want to subtract”)
print(“3 if you want to Multiply”)
print(“4 if you want to divide”)
print(“5 if you want to do powers operations”)
print(“6 if you want to do root operations”)

operation=input(‘Enter the serial number of the operation!:’)
print (operation)
(first)=input(‘First number:’)
(second)=input(‘Second Number:’)

#See which operation has the user selected

if int(operation)==1:
print(“Then you want to add I guess:”,int(first)+int(second))
elif int(operation)==2:
print(“Then you want to Subtract I guess:”,int(first)-int(second))
if int(operation)==3:
print(“Then you want to Multiply I guess:”,int(first)*int(second))
elif int(operation)==4:
print(“Then you want to Divide I guess:”,int(first)/int(second))
elif int(operation)==5:
print(“Then you want to power I guess:”,pow(int(first),int(second)))
elif int(operation)==6:
print(“Then you want to root I guess:”,(math.isqrt( int(first))))

Hope you liked this blog , I will make more python blogs

please applaud and follow me on medium 🙂



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Azaan Hasan

Azaan Hasan


Student studying in class-8 , tech lover, cuber and programmer..