Skip to content

ssrijandev/magic-number-5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”’ Magical Number Puzzle Animation

A fun, interactive number trick that feels like magic – built using HTML, CSS, and JavaScript.
Perfect for teaching kids (ages 10–15) basic arithmetic and programming logic with a touch of mystery!


🎯 What It Does

The user inputs a number, and the app walks them through a step-by-step animated puzzle:

  1. Adds the same number again.
  2. Adds 10 to the total.
  3. Takes half of the result.
  4. Subtracts the friend’s part.
  5. Reveals the magical number: always 5!

This trick always ends up with the number 5 β€” no matter what number is entered β€” making it feel magical while reinforcing math logic!


πŸ’‘ Educational Purpose

Math Concepts:

  • Addition
  • Division
  • Variables
  • Logic

Programming Concepts:

  • Input/output handling in JavaScript
  • Delays with async/await
  • CSS transitions and animations
  • DOM manipulation

Great for classroom demos, coding workshops, or learning projects for students aged 10 to 15.


πŸš€ How to Use

  1. Open https://srijandev145.github.io/magic-number-5/ in any modern web browser.
  2. Enter a number in the input field.
  3. Click Start Magic!
  4. Watch the animated steps reveal the logic of the puzzle.

πŸ› οΈ Technologies Used

  • HTML: Structure
  • CSS: Styling and animations
  • JavaScript: Logic, interactivity, async flow

Feel free to fork, star, or contribute!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages