Python Calculator
from whiteCalculator import Calculator
c = Calculator()
print(c.run("1+8(5^2)"))
# Output: 201
print(c.run("9Ans"))
# Output: 1809
Python Calculator
from whiteCalculator import Calculator
c = Calculator()
print(c.run("1+8(5^2)"))
# Output: 201
print(c.run("9Ans"))
# Output: 1809
python calculator
num_one = int(input("Enter 1st number: "))
op = input("Enter operator: ")
num_two = int(input("Enter 2nd number: "))
if op == "+":
print(num_one + num_two)
elif op == "-":
print(num_one - num_two)
elif op == "*" or op == "x":
print(num_one * num_two)
elif op == "/":
print(num_one / num_two)
python calculator
print("Enter Your Choice 1(Add)/2(Sub)/3(Divide)/4(Multiply)")
num = int(input())
if num == 1:
print("Enter Number 1 : ")
add1 = int(input())
print("Enter Number 2 : ")
add2 = int(input())
sum = add1 + add2
print("The Sum Is ", sum)
elif num == 2:
print("Enter Number 1 : ")
sub1 = int(input())
print("Enter Number 2 : ")
sub2 = int(input())
difference = sub1 - sub2
print("The Difference Is ", difference)
elif num == 3:
print("Enter Number 1 : ")
div1 = float(input())
print("Enter Number 2 : ")
div2 = float(input())
division = div1 / div2
print("The Division Is ", division)
elif num == 4:
print("Enter Number 1 : ")
mul1 = int(input())
print("Enter Number 2 : ")
mul2 = int(input())
multiply = mul1 * mul2
print("The Difference Is ", multiply)
else:
print("enter a valid Number")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us