-
Notifications
You must be signed in to change notification settings - Fork 0
/
math.py
65 lines (56 loc) · 1.73 KB
/
math.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import time, sys
from colorama import init
from termcolor import colored
import traceback
import tracemalloc
tracemalloc.start()
# use Colorama to make Termcolor work on Windows too
init()
def np(str):
i=0
for letter in str:
i=i+1
sys.stdout.write(letter)
sys.stdout.flush()
time.sleep(0.1)
sys.stdout.write("\n")
def add(num):
numX=num.split("+")
results = list(map(int, numX))
a=sum(results)
return a
def cArea(RAD,pi=3.1415926535):
try:
A=pi*(RAD**2)
return A
except Exception as e:
message = f"An exception of type {type(e).__name__,} occurred. Arguments:\n{e.args}"
#return message
return colored(("Hi! seems like you got a error heres the ERROR:",message),'blue',)
def cVOL(RAD,pi=3.1415926535):
try:
A=4/3*pi*(RAD**3)
return A
except Exception as e:
message = f"An exception of type {type(e).__name__,} occurred. Arguments:\n{e.args}"
return colored(("Hi! seems like you got a error heres the ERROR:",message),'blue',)
def Aseries(n):
try:
ans=n*(n+1)/2
return ans
except Exception as e:
message = f"An exception of type {type(e).__name__,} occurred. Arguments:\n{e.args}"
return colored(("Hi! seems like you got a error heres the ERROR:",message),'blue',)
async def factorial(n):
try:
a=factorial(n)
return await a
except Exception as e:
message = f"An exception of type {type(e).__name__,} occurred. Arguments:\n{e.args}"
return colored(("Hi! seems like you got a error heres the ERROR:",message),'blue',)
async def cooltesta():
b=4
return await b
a=input("what circle radius,")
print(cooltesta())
#a=num.split()