-
Notifications
You must be signed in to change notification settings - Fork 180
/
Copy pathpi calculator.py
26 lines (22 loc) · 953 Bytes
/
pi calculator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from math import *
#pi for calculations
def pie():
get_from_user = int(input("Enter number:"))
get_from_use = int(input("Enter next number:"))
get_users_view = input("Enter operator like + - / * :"))
if get_from_user == "pi" and get_users_view == "+":
print(get_from_user+get_from_use)
elif get_from_use == "pi" and get_users_view == "+":
print(get_from_user+get_from_use)
if get_from_user == "pi" and get_users_view == "-":
print(get_from_user-get_from_use)
elif get_from_use == "pi" and get_users_view == "-":
print(get_from_user-get_from_use)
if get_from_user == "pi" and get_users_view == "*":
print(get_from_user*get_from_use)
elif get_from_use == "pi" and get_users_view == "*":
print(get_from_user*get_from_use)
if get_from_user == "pi" and get_users_view == "/":
print(get_from_user/get_from_use)
elif get_from_use == "pi" and get_users_view == "/":
print(get_from_user/get_from_use)