Friday, 29 October 2021

How to make calculator by Python Code

                      How to make calculator via python

             


1.For the sum of two numbers

step1 print ("enter your first  numbers")
step2 n1 = input ()
step3 print ("enter your second number")
step4 n2 = input ()
step5 print ("sum of these two numbers is",int(n1)+int(n2)


2.For the subtraction of two numbers

step1 print ("enter your first number"
step2 n1= input ()
step 3 print ("enter your second number")
step4 n2 = input ()
step5 print ("subtraction of these two numbers is",int(n1)-int(n2)

3.For multiplication of two numbers

step1 print ("enter your first number"
step2 n1= input ()
step 3 print ("enter your second number")
step4 n2 = input ()
step5 print ("multiplication of these two numbers is",int(n1)*int(n2)

4.For division of two numbers

step1 print ("enter your first number"
step2 n1= input ()
step 3 print ("enter your second number")
step4 n2 = input ()
step5 print ("division of these two numbers is",int(n1)/int(n2)


that's all folks! you can make more than two numbers of the calculator by putting their numbers as n(1), n(2), n(3), n(4).........



               

Help me out there - https://shrinke.me/EPgv8k0H

https://shrinke.me/xptdK

Aditya Patel

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 comments:

Post a Comment