Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

write a program that asks the user for their name using input. it shoul…

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:

Explanation:

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.")

Answer:

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.")