Python Forum
Creating guest list manager
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating guest list manager
#2
What is your thinking here:
    elif choice == '2':
        new_guest = float(input('\nPlease enter a new guest.: '))
        if new_guest == 0:
            print('That name is already on the list')
        elif new_guest == 0:  # <-  Why the duplicate??
        else:
            guestlist.append(new_guestlist)
Wouldn't new_guest be a name? The guests in guest_list are names, so why are you changing the input to a float?

After you fix the input so new_guest is a name (str), how can you verify the name is not IN guest_list?

If zero is entered aren't you supposed to exit the loop? How does this exit the loop?
    if choice == '0':
        print('\nThank you for using guest list manager.')
From the assignment it sounds like you are supposed change a "while loop condition". Your while loop condition is "True". You can't change that. How can you make a condition that you can change from True to False?
Reply


Messages In This Thread
Creating guest list manager - by nickster11 - Feb-07-2021, 09:43 PM
RE: Creating guest list manager - by deanhystad - Feb-08-2021, 02:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  "Travis" guest list name checker (Ziyad Yehia Udemy course) Drone4four 8 4,116 Aug-24-2019, 03:46 PM
Last Post: jefsummers
  Creating a list from a sequence without while-loop schniefen 2 2,379 Apr-01-2019, 07:40 PM
Last Post: nilamo
  EASY- creating a for loop with a list rico 2 2,747 Nov-30-2018, 03:53 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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