A command-line quiz game inspired by the popular TV show Kaun Banega Crorepati. The game fetches live trivia questions from an online API and lets players answer questions to climb the prize ladder.
- 🎯 Dynamic Trivia Questions using an API
- 🪜 KBC Prize Money Ladder
- 🎮 Interactive CLI Gameplay
- 🧠 Difficulty Levels
- Easy
- Medium
- Hard
- 🃏 Lifelines
- Skip Question (once per game)
- 50-50 (removes two wrong answers)
- 💰 Real-time Prize Tracking
- 🎨 Colored Terminal UI using
rich
Enter your name: Vraj
Welcome to Kaun Banega Crorepati
Select Difficulty Level
1. Easy
2. Medium
3. Hard
Enter choice: 2
Question 1 for ₹1000
Which planet is known as the Red Planet?
A. Venus
B. Mars
C. Saturn
D. Mercury
Lock your answer (A/B/C/D | skip | quit | 5050):
git clone https://github.com/yourusername/kbc-cli-game.git
cd kbc-cli-game
python -m venv .venv
Activate:
Windows
.venv\Scripts\activate
Linux / Mac
source .venv/bin/activate
pip install -r requirements.txt
python main.py
requestsrich
Install manually if needed:
pip install requests rich
kbc-cli-game
│
├── main.py
├── trivia_api.py
├── requirements.txt
└── README.md
- Questions are fetched from an online trivia API.
- Internet connection is required.
- The Skip lifeline removes the current question without increasing the prize level.
- Store player scores
- Worldwide rankings
- MongoDB Atlas support
- Persistent score tracking
- Signed score submissions
- Game session validation
- Ask the Audience
- Phone a Friend
- Replace Question
- Progress bars
- Better layouts with Rich
- Games played
- Highest score
- Accuracy rate
- Compete with friends
- Live leaderboard updates
Pull requests are welcome! If you'd like to improve gameplay or add features, feel free to fork the repo.
GNU General Public License v3.0
⭐ If you like this project, consider starring the repository!