0% found this document useful (0 votes)
15 views4 pages

Source Code

The document contains a list of video games with details such as title, genre, developer, year of release, and rating. It also includes a management system that allows users to display all games, search for a specific game, add new games, modify existing games, or delete games from the list. The system operates in a loop until the user chooses to exit.

Uploaded by

suryasunjeiy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

Source Code

The document contains a list of video games with details such as title, genre, developer, year of release, and rating. It also includes a management system that allows users to display all games, search for a specific game, add new games, modify existing games, or delete games from the list. The system operates in a loop until the user chooses to exit.

Uploaded by

suryasunjeiy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SOURCE CODE:

games_list = [
{"title": "The Witcher 3", "genre": "RPG", "developer": "CD Projekt", "year": 2015, "rating": 9.5},
{"title": "GTA V", "genre": "Action", "developer": "Rockstar Games", "year": 2013, "rating": 9.7},
{"title": "Red Dead Redemption 2", "genre": "Adventure", "developer": "Rockstar Games", "year": 2018, "rating": 9.8},
{"title": "God of War", "genre": "Action", "developer": "Santa Monica Studio", "year": 2018, "rating": 9.6},
{"title": "God of War Ragnarok", "genre": "Action", "developer": "Santa Monica Studio", "year": 2022, "rating": 9.4},
{"title": "Cyberpunk 2077", "genre": "RPG", "developer": "CD Projekt", "year": 2020, "rating": 8.5},
{"title": "Elden Ring", "genre": "RPG", "developer": "FromSoftware", "year": 2022, "rating": 9.6},
{"title": "Dark Souls III", "genre": "RPG", "developer": "FromSoftware", "year": 2016, "rating": 9.0},
{"title": "Sekiro: Shadows Die Twice", "genre": "Action", "developer": "FromSoftware", "year": 2019, "rating": 9.1},
{"title": "Bloodborne", "genre": "RPG", "developer": "FromSoftware", "year": 2015, "rating": 9.2},

{"title": "The Last of Us Part I", "genre": "Drama", "developer": "Naughty Dog", "year": 2013, "rating": 9.7},
{"title": "The Last of Us Part II", "genre": "Drama", "developer": "Naughty Dog", "year": 2020, "rating": 9.0},
{"title": "Uncharted 4", "genre": "Adventure", "developer": "Naughty Dog", "year": 2016, "rating": 9.4},

{"title": "Marvel's Spider-Man", "genre": "Action", "developer": "Insomniac Games", "year": 2018, "rating": 9.4},
{"title": "Spider-Man Miles Morales", "genre": "Action", "developer": "Insomniac Games", "year": 2020, "rating": 8.9},
{"title": "Ratchet & Clank: Rift Apart", "genre": "Action", "developer": "Insomniac Games", "year": 2021, "rating": 9.1},

{"title": "Horizon Zero Dawn", "genre": "Action RPG", "developer": "Guerrilla Games", "year": 2017, "rating": 9.0},
{"title": "Horizon Forbidden West", "genre": "Action RPG", "developer": "Guerrilla Games", "year": 2022, "rating":
9.2},

{"title": "Assassin's Creed Origins", "genre": "Action", "developer": "Ubisoft", "year": 2017, "rating": 8.7},
{"title": "Assassin's Creed Odyssey", "genre": "Action", "developer": "Ubisoft", "year": 2018, "rating": 8.8},
{"title": "Assassin's Creed Valhalla", "genre": "Action", "developer": "Ubisoft", "year": 2020, "rating": 8.4},

{"title": "Far Cry 5", "genre": "Action", "developer": "Ubisoft", "year": 2018, "rating": 8.1},
{"title": "Far Cry 6", "genre": "Action", "developer": "Ubisoft", "year": 2021, "rating": 8.0},

{"title": "Battlefield 1", "genre": "FPS", "developer": "DICE", "year": 2016, "rating": 8.8},
{"title": "Battlefield V", "genre": "FPS", "developer": "DICE", "year": 2018, "rating": 7.9},

{"title": "Call of Duty Modern Warfare", "genre": "FPS", "developer": "Infinity Ward", "year": 2019, "rating": 8.6},
{"title": "Call of Duty Modern Warfare II", "genre": "FPS", "developer": "Infinity Ward", "year": 2022, "rating": 8.2},

{"title": "Halo Infinite", "genre": "FPS", "developer": "343 Industries", "year": 2021, "rating": 8.3},
{"title": "Forza Horizon 4", "genre": "Racing", "developer": "Playground Games", "year": 2018, "rating": 9.1},
{"title": "Forza Horizon 5", "genre": "Racing", "developer": "Playground Games", "year": 2021, "rating": 9.2},

{"title": "Resident Evil 2 Remake", "genre": "Horror", "developer": "Capcom", "year": 2019, "rating": 9.1},
{"title": "Resident Evil 4 Remake", "genre": "Horror", "developer": "Capcom", "year": 2023, "rating": 9.3},
{"title": "Resident Evil Village", "genre": "Horror", "developer": "Capcom", "year": 2021, "rating": 8.9},

{"title": "Doom Eternal", "genre": "FPS", "developer": "id Software", "year": 2020, "rating": 9.0},
{"title": "Metro Exodus", "genre": "FPS", "developer": "4A Games", "year": 2019, "rating": 8.7},

{"title": "Death Stranding", "genre": "Adventure", "developer": "Kojima Productions", "year": 2019, "rating": 8.5},
{"title": "Alan Wake 2", "genre": "Horror", "developer": "Remedy Entertainment", "year": 2023, "rating": 9.4},
{"title": "Control", "genre": "Action", "developer": "Remedy Entertainment", "year": 2019, "rating": 8.6},

{"title": "Star Wars Jedi Fallen Order", "genre": "Action", "developer": "Respawn Entertainment", "year": 2019,
"rating": 8.9},
{"title": "Star Wars Jedi Survivor", "genre": "Action", "developer": "Respawn Entertainment", "year": 2023, "rating":
9.0}
]

while True:
print("\n................................AAA GAMES MANAGEMENT SYSTEM..............................")
print(".............................MAIN MENU...........................")
print("1. Display All Games")
print("2. Search Game")
print("3. Add Game")
print("4. Modify Game")
print("5. Delete Game")
print("6. Exit")

print("*****************************************************************************************
******************************************************************************")

choice = int(input("Enter choice: "))

if choice == 1:
for g in games_list:
print(g)

elif choice == 2:
name = input("Enter game title: ")
for g in games_list:
if g["title"].lower() == [Link]():
print(g)

elif choice == 3:
t = input("Title: ")
gen = input("Genre: ")
dev = input("Developer: ")
y = int(input("Year: "))
r = float(input("Rating: "))
games_list.append({"title": t, "genre": gen, "developer": dev, "year": y, "rating": r})
print(".............................DATA ADDED SUCESSFULLY!!!!............................")
elif choice == 4:
name = input("Enter title to modify: ")
for g in games_list:
if g["title"].lower() == [Link]():
g["genre"] = input("New Genre: ")
g["developer"] = input("New Developer: ")
g["year"] = int(input("New Year: "))
g["rating"] = float(input("New Rating: "))

elif choice == 5:
name = input("Enter title to delete: ")
for g in games_list:
if g["title"].lower() == [Link]():
games_list.remove(g)
print(".....................GAME REMOVED SUCESSFULLY!!!!..........................")

else:
break

You might also like