the-honk/school/a-level/Y12 2022-2024/Homework/30-01-23 - Logic Gates/Worksheet Program.py

16 lines
341 B
Python

def intInput(name):
while True:
try:
number = int(input(f'Please enter an integer for {name}: '))
return number
except ValueError:
print('Please enter a valid integer.')
A = intInput('A')
B = intInput('B')
C = intInput('C')
if (A < B) or (B < C):
A = B
print(A)