Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #The largest odd number of three variables.
- import random
- x=str(random.randint(0, 100))
- y=str(random.randint(0, 100))
- z=str(random.randint(0, 100))
- #print(x,y,z) #uncomment to check the variables.
- if int(x)%2==0:
- x=''
- if int(y)%2==0:
- y=''
- if int(z)%2==0:
- z=''
- if x+y+z == '':
- print('all numbers are even')
- else:
- print (max (x,y,z))
Advertisement
Add Comment
Please, Sign In to add comment