QUESTION IMAGE
Question
write a program that asks the user for their name using input. it should have another string variable that represents the name on a particular table reservation in a restaurant, stored in a variable called reservation_name. the program should print right this way! if the users name matches the name on the reservation, and sorry, we dont have a reservation under that name. otherwise. an example run of your program might look like this:
Step1: Get user input
user_name = input("Please enter your name: ")
Step2: Define reservation name
reservation_name = "John" # You can change this to any name
Step3: Compare names
if user_name == reservation_name:
print("Right this way!")
else:
print("Sorry, we don't have a reservation under that name.")Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
user_name = input("Please enter your name: ")
reservation_name = "John" # Replace "John" with the actual reservation name
if user_name == reservation_name:
print("Right this way!")
else:
print("Sorry, we don't have a reservation under that name.")