/Sorting-Hat-Quiz

The Harry Potter Sorting Hat Quiz - a Codecademy student project in C++

Primary LanguageC++MIT LicenseMIT

Sorting-Hat-Quiz

The Harry Potter Sorting Hat Quiz - a Codecademy student project in C++

Overview

This project presents a delightful console-based quiz application inspired by the magical Sorting Hat from the Harry Potter series. Users are asked a series of questions, each contributing to a score for one of the four Hogwarts houses: Gryffindor, Hufflepuff, Ravenclaw, and Slytherin. The house with the highest score at the end of the quiz is deemed the best fit for the user.

Features

  • Interactive Quiz Format: Users interact with the quiz through a console interface, responding to prompts to answer questions.
  • Dynamic Scoring System: Each answer influences the user's alignment with the four Hogwarts houses, dynamically updating scores based on responses.
  • Input Validation: The program includes input validation to ensure users enter valid responses, improving user experience and program stability.
  • Final House Assignment: At the end of the quiz, the program calculates the highest-scoring house and "sorts" the user accordingly.

How to Use

  1. Compile the Program: Use a C++ compiler to compile the source code.
  2. Run the Executable: Launch the compiled program to start the quiz.
  3. Answer Questions: Respond to each question by typing a number corresponding to your choice and press Enter.
  4. View Your House Assignment: After answering all questions, the program will display your assigned Hogwarts house.

Requirements

  • C++ Compiler (GCC, Clang, MSVC, etc.)
  • Standard C++ library

Development Environment

  • Language: C++
  • External Libraries: None
  • Tested On: [Windows 11]

Contributions

This is an open-source project and contributions are welcome. Please read the CONTRIBUTING.md for guidelines on how to contribute.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgements

  • J.K. Rowling, for creating the magical world of Harry Potter.
  • Codecademy.com for their learn C++ course
  • The C++ community for ongoing support and resources.

Author

Joseph McKinney - Find more of my work with my Github user name Joecode22.

Enjoy the magical journey of the Sorting Hat Quiz!