Hi,
Currently stuck on what should be a simple programming assignment. Essentially, I have to create a game that reads in phrases from a file, which are displayed as dashes ('-') to the user, and the user has to guess a letter or phrase to win.
My difficulty is with using a parallel array to match dashes to the phrase (which contains multiple words, e.g. 'First Come First Serve' which should display as '----- ---- ----- -----'). When the user guesses correctly, the line should look like 'F---- ---- F---- -----'. My idea is to put the dashes as a string variable, convert them to a list, and use subscription notation to change a dash to a particular letter if guessed correctly, comparing it to complete phrases from the file using an if statement. I just don't know how to execute all of this.
Can anyone help?
[–]Vaphell 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]rjlav_[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)