-
Notifications
You must be signed in to change notification settings - Fork 181
/
otherAngle.py
37 lines (35 loc) · 941 Bytes
/
otherAngle.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
def complementary():
while(True):
complementary = float(input('Complementary of : '))
if complementary <= 90:
complement = 90 - complementary
return(complement)
break
else:
print('Number greater than 90 degree. Try again')
continue
def supplementary():
while(True):
supplementary = float(input('Supplementary of : '))
if supplementary <= 180:
supplement = 180 - supplementary
return(supplement)
break
else:
print('Number greater than 180 degree. Try again')
continue
while(True):
countOrEnd = str(input('Count or End : '))
if countOrEnd.strip() == 'Count':
print('\nSupp for supplementary\nComp for complementary')
getSuppOrCom = str(input('Supp or Comp : '))
if getSuppOrCom.strip() == 'Supp':
print(supplementary())
continue
elif getSuppOrCom.strip() == 'Comp':
print(complementary())
continue
else:
break
else:
quit()