The correct ordering of the python program which raises an exception based on the number of tickets to be ordered is given below :
class Over400Error(Exception):
pass
#define the over400 class
tickets = input("How many tickets? ")
tickets = int(tickets)
costEach = 25
#user input for number of tickets and price per ticket
try :
if tickets > 400 :
raise Over400Error
else:
cost = tickets * costEach
print("You owe $", str(cost))
#try portion displays the total ticket cost if units is less than 400
except Over400Error:
print("You cannot order over 400 tickets. ")
#rather than throwing an error, this message is displayed for tickets above 400 units.
A sample run of the program is attached.
Learn more : https://brainly.com/question/19868999