This is a program that tests your knowledge and familiarity with music. It will test you by giving you an Artist's name and the starting letter of each word of the song. You will then have 2 attempts at guessing the name of the song. If you are correct then you gain 3 points and move on to the next one. And if you can't your journey will end there. You will then be shown the top 5 scores in the leader board and your overall ranking. So do you have what it takes? Let's find out!
Getting Started
Requirements:
Python 3.6+
- Packages in
requirements.txt
Configuring
All the configurations you need to do is set the paths to the CSV files. Say this is the directory structure: .
Music quiz game
│ config.py
│
└───data/
│ │ questions.csv
│ │ scores.csv
│ │ users.csv
│ │
│
You would then edit config.py
to make sure the correct paths are configured:
USER_FILE = "data/users.csv"
SCORE_FILE = "data/scores.csv"
QUESTION_FILE = "data/questions.csv"
Save the file and exit to save your paths.
Registering
To register your self all you need to do is open
users.csv
located in /data/
.
NOTE: Your will have to open in with a text editor like notepad
or even Atom
OR You will need to open it with a program like Microsoft Excel
or OpenOffice CALC
.
This is what the file may look like:
uid,password
user1,password
uid,password
are the headers or titles for these files. Notice there is no space between them or after them.
Say that you want a user name mike
and your password Mex!c0
.
The you will add the entry like this:
uid,password
user1,password
mike,Mex!c0
Note: Make sure there are no spaces in the entries. Other wise you will face problems when logging in
Feel free to add more if required. After you are finished, save the file and exit. You have successfully registered yourself!
Usage
Start App
First Navigate to the root directory of the app then in the terminal type:
For Windows:
C:\PythonXX\python.exe C:\script\music_quiz\main.py
NOTE: Replace XX with python version
For Mac/Linux/Unix:
python main.py
Login
You will be greeted with this login screen. Enter your Login
Details and hit Return
after every entry.
##############_LOGIN_##############
Welcome to Music Quiz Game V.0.1
Enter your credentials to login!
Username: mike
Password: Mex!c0
If after entering your login details you keep seeing Incorrect Credentials
.
Check users.csv
to make sure there are no spaces in the entries!