Python Forum
Beginner - Assistance please
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Beginner - Assistance please
#5
(Nov-20-2020, 03:26 PM)sandeep_ganga Wrote: "for" will iterate over the given, thus try use "if" to direct compare and see if that helps

reservation_name = input(f"\nGood afternoon, Anthony's dinner reservations. \n May I have your full name please? ")
print(f"\nHello {reservation_name.title()} are you looking to make a dinner reservation with us? ")

reservation_reply = ['yes', 'no']
reservation_prompt = input("-> ")
 
if reservation_prompt.lower() in reservation_reply:
    if reservation_prompt.lower() == 'yes':
        print("\nHow many dining guests can I book you in for?")
    else:
        print("\nOh this line is for reservations only, please hold the line and I will forward you on to our management team.")
Best Regards,
Sandeep.

GANGA SANDEEP KUMAR

Sandeep!!!! You did it! thank you so so much! I never realized I could use If and If... for is to loop...right?

Thank you so much for your help! Really!!! I am very grateful! Big Grin
Reply


Messages In This Thread
Beginner - Assistance please - by Elippsis007 - Nov-20-2020, 02:49 PM
RE: Beginner - Assistance please - by perfringo - Nov-20-2020, 02:55 PM
RE: Beginner - Assistance please - by Elippsis007 - Nov-20-2020, 03:10 PM
RE: Beginner - Assistance please - by sandeep_ganga - Nov-20-2020, 03:26 PM
RE: Beginner - Assistance please - by Elippsis007 - Nov-20-2020, 03:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Beginner Assistance liamwemyss 7 6,080 Jun-08-2017, 01:51 PM
Last Post: liamwemyss

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020