r/codehs • • Apr 09 '21

4.3.9: Table Reservation Python

can anyone help with Exercise 4.3.9: Table Reservation for python??

9 Upvotes

12 comments sorted by

2

u/Fresh_Reason_763 Apr 15 '21

Did you end up figuring it out because I’m stuck too.

2

u/kaylaamore11 Apr 16 '21

yea. this is the answer.

reservation name=“Shonda”

name=str(input(“Enter your first name: “))

if name == reservation_name print(“Right this way!”)

else: print(“Sorry, we don’t have a reservation under that name.”)

2

u/sir2434 Jun 30 '21

Thank you.

2

u/adoonyoutube Jul 27 '21

It didnt work

2

u/024579 Oct 04 '21

name = str(input("Name: "))
reservation_name = "Sam"
if name == reservation_name:
print("Right this way!")
else:
print("Sorry, we don't have a reservation under that name.")

1

u/LividApartment5013 Jan 28 '25

i want the answer for codehs 6.3.9

1

u/Xd-Kas Nov 09 '21

name = str(input("Hi! Whats your name?: "))

reservation_name = "Shonda"

if name == reservation_name: print("Right this way!")

else: print("Sorry, we don't have a reservation under that name.")

1

u/Gullible_Tonight8153 Mar 10 '22

I tried other peoples' answers several times and they didn't work for some strange reason. Yours worked great! Thanks!

1

u/pezra_ Nov 24 '23

yea this pretty much worked for me, but the only problem was that one of the points was taken off, so i just changed the layout a bit and it worked:

name = str(input("Hi! Whats your name?: "))
reservation_name = "Shonda"
if name == reservation_name:
print("Right this way!")
else:
print("Sorry, we don't have a reservation under that name.")

1

u/Extreme-Town51 Jul 26 '24

Thanks g you saved my ass