Project Description
This is a command-line quiz game built in Python that tests your knowledge of countries and their capital cities. The game features multiple difficulty levels, a scoring system, life management, and streak bonuses to provide an engaging and challenging experience. You can play in either a normal (country to capital) or reverse (capital to country) mode, with hints and skips available to help you along the way.
Features
Choose from Easy, Medium, and Hard modes, each with unique rules, point values, and lives.
Questions are randomly presented in both "normal" (country to capital) and "reverse" (capital to country) formats.
Earn points for correct answers and receive a bonus for answering questions correctly in a row.
Start with a set number of lives and lose one for each incorrect answer. The game ends when you run out of lives.
Use a limited number of hints to reveal the first letter of the answer or skip a question you don't know.
Your highest score is saved to a file, so you can always try to beat your personal best.
How to Run the Game
Prerequisites
To run this game, you need to have Python 3 installed on your system.
Steps
- Save the files: Ensure both
main.pyanddata.py(which contains the countries_and_capitals and common_countries_and_capitals dictionaries) are in the same directory. - Open a terminal: Navigate to the directory where you saved the files.
- Run the script: Execute the following command:
Project Structure
Code in Place Limitation
This program's full functionality, including the saving of result data to .txt files, is designed for a standard Python environment. Due to the sandboxed nature of the Code in Place IDE, file-saving operations are not supported, and this part of the code will not function. The rest of the program's core features, such as the console output, will work as described.