0
Solved #Relay race coding for unit 9 you are creating code for a relay race
players = ["Alice", "Bob", "Charlie", "David", "Eve", "Frank"] #Create 3 lists with 2 players each #Use slicing to create a list for Group 1 g1 = players [0:2] #Use slicing to create a list for Group 2 g2 = players [2:4] #Use slicing to create a list for Group 3 g3 = players [4:6] print("Group 1:") #display the 1st group print(g1) print("Group 2:") #display the 2nd group print(g2) print("Group 3:") #display the 3rd group print(g3)
2 ответов
+ 2
Missing closing square-bracket in line 11, it should be:
g3 = players[4:6]
Mistyped "Group :1" instead of "Group 1:" in line 13.
0
Oh i see thank you