-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Calculator.py
21 lines (17 loc) · 694 Bytes
/
Calculator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
print("Hello Welcome to Calc by Karan Dhingra")
a = input("Enter the First Number for operation : ")
b = input("Enter the Second number for operation : ")
ch = input("Enter the operator (+, -, *, /, **, %) : ")
if ch == '+':
print("Required Solution is : ",float(a) + float(b))
elif ch == '-':
print("Required Solution is : ",float(a) - float(b))
elif ch == '*':
print("Required Solution is : ",float(a) * float(b))
elif ch == '/':
print("Required Solution is : ",float(a) / float(b))
elif ch == '%':
print("Required Solution is : ",float(a) % float(b))
elif ch == '**':
print("Required Solution is : ",float(a) ** float(b))
print("ThankYou For Using Karan's Calc")