Last active
June 15, 2022 17:04
-
-
Save albionbrown/72559f034f014b6f27740cf585e4f8e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
game_store_name = 'Blockbuster' | |
games = [] | |
def add_game(name, age, category): | |
game = { | |
'name': name, | |
'age': age, | |
'category': category | |
} | |
games.append(game) | |
# end of add_game() | |
def remove_game(name): | |
for id, game in enumerate(games): | |
if (game['name'] == name): | |
del games[id] | |
# end of remove_game() | |
add_game('Halo', 16, 'FPS') | |
add_game('Rocket League', 3, 'Esports') | |
add_game('Sonic', 5, 'Retro') | |
add_game('Mario', 3, 'Retro') | |
remove_game('Halo') | |
print(games) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment