Skip to content

A simple web app to calculate and validate the sum of two random numbers. Built with HTML, CSS, JavaScript, and Bootstrap, hosted on GitHub Pages.

Notifications You must be signed in to change notification settings

Darshanas17/Addition-Game

Repository files navigation

Sum of Two Numbers Game

This repository contains an interactive web application where users can test their addition skills by solving random sums of two numbers. The app generates two random numbers, displays them, and allows the user to input their answer and check if it's correct.

Features

  • Random generation of two numbers between 1 and 100.
  • Interactive user interface using HTML, CSS, and JavaScript.
  • Responsive design powered by Bootstrap 4.
  • Provides immediate feedback on the user's input.
  • "Restart" button to generate a new pair of numbers.

How to Use

  1. Open the application in any modern web browser.
  2. View the two randomly generated numbers and the "+" operator.
  3. Input your answer in the provided text box.
  4. Click the "Check" button to validate your answer.
  5. Click the "Restart" button to start a new round with different numbers.

Files Included

  • index.html: The main HTML file containing the structure of the web application.
  • style.css: Contains the custom CSS styles for the application.
  • script.js: Includes the JavaScript logic for generating numbers, checking results, and restarting the game.

Dependencies

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/Darshanas17/Addition-Game.git
  2. Navigate to the project folder:

    cd Addition-Game
  3. Open index.html in your web browser to start the game.

Screenshots

Initial Screen

Initial Screen

Correct Answer

Correct Answer

Incorrect Answer

Incorrect Answer

Contributing

Feel free to fork this repository and submit pull requests with improvements or bug fixes. Contributions are welcome!

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

About

A simple web app to calculate and validate the sum of two random numbers. Built with HTML, CSS, JavaScript, and Bootstrap, hosted on GitHub Pages.

Topics

Resources

Stars

Watchers

Forks