Space Cadet Quiz: Test Your Astronomy Knowledge!

by HACKER in Design > Software

27 Views, 0 Favorites, 0 Comments

Space Cadet Quiz: Test Your Astronomy Knowledge!

Screenshot 2025-10-13 211159.png

Step into the role of a space cadet in training with this interactive terminal-based Astronomy Quiz! Answer 25 challenging questions about planets, moons, stars, and galaxies, and see if you have what it takes to become a true space explorer.

Downloads

Set Up Your Python Environment

Make sure you have Python 3.x installed.

  1. Download from python.org if needed.

Use a terminal or command prompt to check your Python version:

python --version


Create the Project File

  1. Open a text editor (VS Code, Notepad++, or even plain Notepad).
  2. Create a new file and name it:

space_cadet_quiz.py
  1. Copy the full Python code of the quiz into this file.


Run the Quiz

Open your terminal or command prompt.

Navigate to the folder containing your space_cadet_quiz.py file.


cd path_to_your_file

Run the program:


python space_cadet_quiz.py

Follow the on-screen instructions:

  1. Enter numbers 1-4 to answer each question.
  2. Enjoy fun space facts after every question.
  3. See your final score and encouragement at the end!


Customize (Optional)

  1. You can add more questions by editing the questions list in the code.
  2. Add more fun facts to the space_facts list.
  3. Change text colors in the terminal by modifying the ANSI color codes:

GREEN = "\033[92m"
RED = "\033[91m"
YELLOW = "\033[93m"
CYAN = "\033[96m"
RESET = "\033[0m"