Simple Python Calculator

by Robobot in Circuits > Software

453 Views, 1 Favorites, 0 Comments

Simple Python Calculator

build-simple-python-calculator.jpg

Hi, everyone in this instructable I made a simple calculator using python programming.

Supplies

Python-IDLE.jpg

for this project, you only need python programming software.

Installing Software

Screenshot (214).png

First, download the python programming software from the python website.

Screenshot (213).png

Make sure you first open a new file by clicking on file button.

Code :-

a=int(input("Enter a number:"))

b=int(input("Enter another number:"))

c=input("Enter your choice operator:")

if c=='+':

  print("the sum of number is",a+b)

elif c=='-':

  print("the difference of the number is ",a-b)

elif c=='*':

  print("the product of the number is",a*b)

elif c=='/':

   print("the quotient of the number is",a/b)


else:

  print(" wrong operator")

Testing Calculator

Screenshot (222).png
Screenshot (221).png

Yes, it worked : )