Dec-09-2019, 12:38 PM
Stuck on Music Quiz Game
Hello, I am doing an assignment which is a Music Quiz Game, I have completed The Login, Menu, Rules and now need to do the game itself, but I can't figure out where to start.
I have all the songs and artists on a seperate Document, seperated by the Character "|" I have also made the code for splitting the songs and artists from each other:
Any help would be appreciated.
Hello, I am doing an assignment which is a Music Quiz Game, I have completed The Login, Menu, Rules and now need to do the game itself, but I can't figure out where to start.
I have all the songs and artists on a seperate Document, seperated by the Character "|" I have also made the code for splitting the songs and artists from each other:
def random_line(SongsArtists): line = next(SongsArtists.txt) for num, SongsArtists.txt in enumerate(SongsArtists.txt, 2): if random.randrange(num): continue line = line.strip().split("|") return lineI am stuck on making it pick a a random line from the artist/song list, and making it show you the artist and the song, and then you type the song as your answer. There will be another part but I will do this myself.
Any help would be appreciated.
