Skip to content

This is a Python coded game in which 2 players are asked to guess how many times a word is in a song.

License

Notifications You must be signed in to change notification settings

vdechen/Python_WordCountGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python - Word Count Game

Rules: 2 players are asked to guess how many times a word is in a song. The closest answer to the correct one wins the round.

Technologies

  • Python

Steps

A Python code was developed to allow the following actions:

  • Display a numbered dictionary of the available songs (Brazilian MPB music) for the player to choose from;
  • Create a dictionary of lyrics that match the numbers of songs previously displayed;
  • Ask the player to choose a song number;
  • Display the chosen song name;
  • Match the chosen song number to its lyrics;
  • Ask for players' names;
  • Generate a random word from a song;
  • Clean lyrics and return the frequency of each word in it in a dictionary;
  • Ask players to guess the random word frequency in the song;
  • Display players' turns and asks each how many times the same word is in a song;
  • Check which player got closer to the right answer and score points;
  • Display the correct answer for the round and the current score for each player;
  • Ask if players want to (1) continue or (2) end the game;
  • If (1), a new random word is generated and players switch turns until they choose to end the game;
  • If (2), displays final score and winner.

Conclusion

  • Try out the game on the Jupyter Notebook available for this project, in which you can also check out more details of the code!

Contact

About

This is a Python coded game in which 2 players are asked to guess how many times a word is in a song.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published