Python Forum
Beginner - Assistance please
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Beginner - Assistance please
#1
Big Grin 
Hello!

I am really struggling to understand why I am getting a return on my interpreter 3 lines for my ['yes, 'no']
prompt.

Would someone kindly review my code and assist me on it? It's driving me nuts here Big Grin

OS - Windows
Text Editor - Sublime Text
Interpreter - Windows PowerShell(x86)

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

reservation_name = input("\nGood afternoon, Anthony's dinner reservations. "
	"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("-> ")

for reservation_reply in reservation_prompt:
	if reservation_reply == '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.")
Error:
Good afternoon, Anthony's dinner reservations. May I have your full name please? michael drumm Hello Michael Drumm are you looking to make a dinner reservation with us? -> yes Oh this line is for reservations only, please hold the line and I will forward you on to our management team. Oh this line is for reservations only, please hold the line and I will forward you on to our management team. Oh this line is for reservations only, please hold the line and I will forward you on to our management team.
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,092 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