# Ava Smith # smi01868 # CSCI 1133H (001) # Assignment 2 #======================== #Purpose: Prints a schedule for oral exams that are ten minutes long with a five minute break between a time range including a lunch break #Input Parameters: start_time: the begining of oral exam time, end_time: the end of oral exam time, lunch_time: time were there would be a thirty miinute break #Return Values: returns slots which is an int. Can be any even number from 0 to 44 #========================= def oral_exam_sign_up(start_time, end_time, lunch_time): slots = 0 #Validating inputs if(type(start_time) != int or type(end_time) != int or type(lunch_time) != int): print("Invalid Input. Parameters must be Integers Ranging 1-12") return slots elif(1 >= start_time >= 12 or 1 >= end_time >= 12 or 1>= lunch_time >= 12): print("Invalid Input. Parameters must be Integers Ranging 1-12") return slots while start_time != end_time: if( start_time != lunch_time): print('{0}:00-{0}:10'.format(start_time)) print('{0}:15-{0}:25'.format(start_time)) print('{0}:30-{0}:40'.format(start_time)) print('{0}:45-{0}:55'.format(start_time)) slots += 4 else: print('{0}:30-{0}:40'.format(start_time)) print('{0}:45-{0}:55'.format(start_time)) slots += 2 if start_time < 12: start_time += 1 else: start_time = 1 return slots