-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaxOfThree.py
More file actions
34 lines (26 loc) · 763 Bytes
/
maxOfThree.py
File metadata and controls
34 lines (26 loc) · 763 Bytes
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
print ('WELCOME TO THE MAXIMUM MAXIMUM MAXIMIZER FOR MAXIMUM MAXIMIZATION')
print ('ENTER THREE NUMBERS AND PREPARE TO BE MAXIMIZED')
while True:
try:
print ('\nENTER YOUR FIRST NUMBER')
x = input()
x = int(x)
print ('\nENTER YOUR SECOND NUMBER')
y = input()
y = int(y)
print ('\nENTER YOUR THIRD NUMBER')
z = input()
z = int(z)
break
except:
print ('\nERROR, MAXIMUM MAXIMIZER REQUIRES THREE INTEGERS TO MAXIMIZE')
continue
def maxOfThree ( x, y, z ):
print ('\nYOUR MAXIMIZED NUMBER IS:')
if x > y and x > z:
print (x)
if x < z and y < z:
print (z)
if x < y and y > z:
print (y)
maxOfThree( x, y, z)