-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex5.py
71 lines (49 loc) · 1 KB
/
ex5.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
65
66
67
68
69
70
71
from math import *
#ex 3
print('a?\n')
a = int(userInput)
except ValueError:
print("That's not an int!")
print('b?\n')
b = int(userInput)
except ValueError:
print("That's not an int!")
print('c?\n')
c = int(userInput)
except ValueError:
print("That's not an int!")
print('n?\n')
n = int(userInput)
except ValueError:
print("That's not an int!")
def check_fermat(a,b,c,n):
if a**n + b**n == c**n:
print ("nope that doesn't work.")
else:
print ('Holy smokes, Fermat was wrong!')
check_fermat(a,b,c,n)
"""
#ex 4
x = input ('a?\n')
y = input ('b?\n')
z = input ('c?\n')
def is_greater(e,f,g):
if e > f and e > g:
GREATER=e
OTHERS=f+g
if GREATER < OTHERS:
print ('Yes')
else:
print ('No')
else:
l = e
m = f
n = g
is_greater (m, n, l)
def is_triangle(d,e,f):
a = int(d)
b = int(e)
c = int(f)
is_greater(a,b,c)
is_triangle(x,y,z)
"""