The standard baggage allowance for a flight is 25Kg. If the…

Questions

The stаndаrd bаggage allоwance fоr a flight is 25Kg. If the baggage weight exceeds that, the passenger is charged $10 fоr every Kg, or part thereof, over 25Kg. For example, if the weight is 26.5Kg, the charge will be $20. If the baggage weight exceeds 100Kg, the airline will not allow the passenger to fly. Create an exception class TooMuchWeightErrorCreate a function get_charge that calculates the cost of excess baggage. If the passenger is not allowed to fly, it raises a TooMuchWeightError exception.Use the above to write a program that asks the user for the baggage weight and calculates the excess baggage cost. If the passenger is not allowed to fly, an appropriate error message should be output instead. The program should also check for invalid input (not a number or a negative) and re-prompt the user. The program should terminate with a suitable message if it receives the end-of-file on input. The main code should be in a function called main. Use the prompt and output from the examples. 01