May-02-2018, 10:58 PM
Hi team,
New to python and as a gamer, I would like to analyze player data. This would be easy on excel with Vlookup, but I'm having trouble in python.
Here is sample data from two files:
player_game_data.txt
0001 9999 65
0001 8521 5
0002 1234 32
0003 3444 45
Game_id.txt
9999 Fortnite
8521 God of War
1243 Call of Duty
3444 World of Warcraft
Code should function like this...
PlayerID Input: 0001
Print:
Fortnite, 65
God of War, 5
New to python and as a gamer, I would like to analyze player data. This would be easy on excel with Vlookup, but I'm having trouble in python.
Here is sample data from two files:
player_game_data.txt
0001 9999 65
0001 8521 5
0002 1234 32
0003 3444 45
Game_id.txt
9999 Fortnite
8521 God of War
1243 Call of Duty
3444 World of Warcraft
Code should function like this...
PlayerID Input: 0001
Print:
Fortnite, 65
God of War, 5
f = open("player_game_data.txt","r") g = open("game_id.txt", "r") playerGamesPlayed = input("Please type a player's ID to return what games were played and how many times")Please help guide me in the right direction.