Python Challenge Solution

youssef b10ta
PRO
youssef b10ta
Pro Student 2,754 Points

Here is My Aprproach

players = []
answer = 'yes'
while answer == 'yes':
        answer = input('Would you like to add a player to your list yes|no  ').lower()
        if answer == 'yes':
            add_name = input('Enter the name of the player you like like to add ')
            players.append(add_name)
print('The number of the players on this team is {}'.format(len(players)))
count = 0
while count < len(players):
    print('Player {}: {}'.format(count+1 , players[count]))
    count += 1
goalkeeper = int(input('Please Select a goalkeeper from 1-{}  '.format(len(players))))
print('The Goalkeeper for this game will be {}'.format(players[goalkeeper-1]))
Eldin Guzin
Eldin Guzin
1,775 Points

Nice work!,That really is a unique way of approaching this :D

HAROLD MORI
HAROLD MORI
3,042 Points

great code!, but just a correction (btw innecesary but it's always up to what actually is asking)

the first question is "Would you like to add 'A' player" next ones are "Would you like to add 'ANOTHER' player"

as I repeat it's innecesary but sometimes clients are picky.

again nice, code!