Skip to content

Interactive browser-based quiz with dynamic multiple-choice questions and a timed interface. Utilize HTML, JavaScript, and CSS to track high scores, enabling users to personalize their experience by entering their initials.

License

Notifications You must be signed in to change notification settings

FilipPaskalev/Code-Quiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

81 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Code Quiz Web App

CSS HTML JavaScript edX

Table of content

Project Description

Welcome to the Timed Coding Quiz application! The quiz seamlessly runs in the browser, featuring a sophisticated and responsive user interface powered by HTML, CSS, and JavaScript.

Mock up

The following animation demonstrates the application functionality:

Mock-up of the app

How to use

  1. Start the Quiz:
    • Click the "Start" button to initiate the quiz.
    • This triggers the countdown timer and presents the first question.
  2. Answering Questions:
    • Questions are presented one at a time with multiple-choice answers.
    • Click on an answer button.
      • If correct, move to the next question.
      • If incorrect, time is deducted from the clock.
  3. Timer:
    • A timer counts down from a set time (e.g., 60 seconds).
    • Incorrect answers result in time deduction.
    • The quiz ends when all questions are answered or the timer reaches 0.
  4. End of Quiz:
    • Display the user's final score.
    • Save user initials to associate with their score.
  5. High Scores:
    • High scores, including user initials and scores, are stored and can be viewed.

User Interface

  1. A clean, polished interface designed for responsiveness across various screen sizes.
  2. Dynamic updates using JavaScript for a seamless user experience.

Additional Features

  1. Save Initials:
    • Users can input their initials when saving their score.
  2. Score Calculation:
    • Final score is calculated based on correct answers and remaining time.

Technical Implementation

  1. HTML, CSS, and JavaScript:
    • Utilize these technologies for a well-structured and interactive quiz.
  2. Dynamic Updates:
    • Dynamically update HTML and CSS for a smooth user flow.
  3. User Progress:
    • Feedback on user progress is provided during the quiz.

Installation instructions

Option 1 - Download

Download the project from GitHub repository on your local machine.

  1. Open GitHub repository. (link to repository)

  2. Select Code from top navigation section. (reference on the image below) πŸ‘‡

    select code from navigation

  3. Select <> Code dropdown button from sub section. (reference on the image below) πŸ‘‡

    select readme dropdown

  4. Select Download ZIP from dropdown menu to download project in .zip format. (reference on the image below) πŸ‘‡

    select Download ZIP from menu

  5. Unzip the project.

    [!TIP] You can use 7-Zip if you don't have file archiver. 7-Zip is free software with open source. The most of the code is under the GNU LGPL license. Some parts of the code are under the BSD 3-clause License. Also there is unRAR license restriction for some parts of the code. Read 7-Zip License information. Download the application from official website.

  6. Open project with VS Code or other IDE.

Option 2 - Clone project

  1. On GitHub.com, navigate to the main page of the repository. (link to repository).

  2. Above the list of files, click Code. (reference on the image below) πŸ‘‡

    select code drop down

  3. Copy the URL for the repository.

  • To clone the repository using HTTPS, under "HTTPS", click

  • To clone the repository using an SSH key, including a certificate issued by your organization's SSH certificate authority, click SSH, then click

  • To clone a repository using GitHub CLI, click GitHub CLI, then click (reference on the image below) πŸ‘‡

    select copy next to link

  1. Open Git Bash.

  2. Change the current working directory to the location where you want the cloned directory.

  3. Type git clone, and then paste the URL you copied earlier.

    git clone https://github.com/FilipPaskalev/Code-Quiz.git
    
  4. Press Enter to create your local clone.

    $ git clone https://github.com/FilipPaskalev/Code-Quiz.git
    > Cloning into `Spoon-Knife`...
    > remote: Counting objects: 10, done.
    > remote: Compressing objects: 100% (8/8), done.
    > remove: Total 10 (delta 1), reused 10 (delta 1)
    > Unpacking objects: 100% (10/10), done.
    

Project structure

root/                     main directory of the project
  |----.vscode            contains settings for vscode 
  |----assets/            directory for the assets - video, images, sounds ...
      |----readme         directory for readme information
      |----sfx            directory for audio files
  |----css/               directory for the styles
  |----js/                directory for javascript files
      |----logic.js       store logic for application 
      |----questions.js   store data for quiz questions
      |----scores.js      store logic for scores 
      |----utils.js       store all needed resources for js files 
  |----.gitignore         file that indicates which not to be included in git
  |----.prettierrc        settings if you using Prettier extension
  |----highscores.html    file for scores
  |----index.html         root html file
  |----LICENSE            information about the license
  |----README.md          file that describe the project

Demo

Screenshot of the application is on the image below.

demo screenshot

Important

You can find deployed version of the project on πŸ‘‰direct link here or by clicking on the picture above. ☝️

Tools and extensions

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages and runtime (such as C++, C#, Java, Python, PHP, Go, .NET).

VS Code Counter

VS Code extension counts blank lines, comment lines, and physical lines of source code in many programming languages. This extension uses other language extensions to determine the line of code. Therefore, you may need to install the language extension to support a new language. Conversely, as the number of language extensions increases, the range of support for this feature also increases.

Statistics

Files

filename language code comment blank total
.prettierrc JSON 5 0 1 6
README.md Markdown 164 0 59 223
css/styles.css CSS 73 0 16 89
highscores.html HTML 20 0 6 26
index.html HTML 42 0 11 53
js/logic.js JavaScript 100 79 33 212
js/questions.js JavaScript 166 4 1 171
js/scores.js JavaScript 15 10 6 31
js/utils.js JavaScript 19 7 7 33

Languages

language files code comment blank total
JavaScript 4 300 100 47 447
Markdown 1 164 0 59 223
CSS 1 73 0 16 89
HTML 2 62 0 17 79
JSON 1 5 0 1 6

References

Licenses

MIT License

Copyright (c) 2024

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Interactive browser-based quiz with dynamic multiple-choice questions and a timed interface. Utilize HTML, JavaScript, and CSS to track high scores, enabling users to personalize their experience by entering their initials.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published