Python Forum
Search for Player ID and return games played and number of times
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search for Player ID and return games played and number of times
#1
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


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.
Reply


Messages In This Thread
Search for Player ID and return games played and number of times - by disruptfwd8 - May-02-2018, 10:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to compare two cards games? python_beginner99 7 3,726 Nov-30-2021, 06:53 PM
Last Post: deanhystad
  times greater number than the previous rhai 4 3,453 Oct-08-2018, 03:27 AM
Last Post: woooee
  How to used the edge detection in opencv python to return number of edge? Vivian 2 2,691 May-04-2018, 08:31 PM
Last Post: nilamo
  Find how many times a user played an artist and how many times disruptfwd8 1 2,604 May-04-2018, 08:32 AM
Last Post: killerrex
  PLayer vs.PLayer game candylicious 1 3,056 Nov-04-2017, 08:33 PM
Last Post: Lux
  The int that appears an odd number of times. MeeranRizvi 6 6,543 Dec-30-2016, 09:54 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020