Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

Python Question of the Day Jan. 23, 2025

  1. Incorrect Correct No Answer was selected Invalid Answer

    The following program takes reservations for a restaurant. Which line would cause an error that could be handled by adding the try...except structure?

    name = input("Name for the reservation: ")
    num_people = int(input("How many people is the reservation for? "))
    print("Reservation for " + name + " for " + str(num_people) + " people.")
    Python