Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 1.47 KB

README.md

File metadata and controls

29 lines (17 loc) · 1.47 KB

Multiple Choice Quiz with Conditionals and Loops

IFSL1T07 - Beginner Control Structures — Loops

Description

This program uses a do-while loop and nested 'if..else' statement to ask the user a multiple choice question. If the user inputted the correct answer, it alerts that they won the game and ends the program. If the user inputs an incorrect answer, it asks if the user would like to try again. If the user enters 'y', the multiple choice question is repeated, and if the user enters 'n', the program is ended.


Installation and Setup

  1. Clone the repo and open with your preferred IDE (e.g. VSCode).
  2. In the IDE, open the quiz.html file and click the 'run' button, or click 'Go Live' if using VSCode. This should open your browser automatically to your localhost port with '/quiz.html' as the URL endpoint.

How to Use

  1. Once the html file is loaded in your browser, a popup window will appear asking you a multiple choice question.
  2. Follow the instructions in the prompts to play and get the answer.

Credits & References

I created this project myself as part of my Hyperiondev course: Immersive Full Stack Web and Software Engineer (Level 1, Task 7), using the following websites for reference.