0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
No active XP Potion
Accept a Quest
Login to submit answers
It's common to create an empty list then fill it with values using a loop. We can add values to the end of a list using the .append()
method:
cards = []
cards.append("nvidia")
cards.append("amd")
# the cards list is now ['nvidia', 'amd']
We need to generate a unique user ID for each player in the game. An ID is just a unique number that identifies a user.
Let's finish the generate_user_list
function. In the body of the loop, use the incrementing value i
as unique IDs and append them to the player_ids
list.
Focus Editor
Alt+Shift+]
Next Tab
Alt+Shift+[
Become a member to Submit
Become a member to Run
Become a member to view solution