Welcome to the Treehouse Community
Looking to learn something new?
Sean Flanagan33,234 Points
What's the difference between Ken's while loop and my if statement?
# If the user answers "Yes", let them type in a name and add it to the list. if (add_player.lower() == "yes"): input("Enter the name of the player to add to the team: ") player_names.append(add_player) # If the user answers "No", print out the team 'roster' else: print(player_names)
Steven Parker221,902 Points
The "if" allows you to add only one player to the team.
The "while" loop allows you to keep adding as many players as you need to fill the whole team.