Skip to content

Rakshitgupta9/MathBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📐 Math Bot

A simple web-based chatbot that evaluates math expressions in real-time.
Built with HTML, CSS, and JavaScript, using math.js for expression parsing and evaluation. 🌐 Live View


🚀 Features

  • Enter any math expression (e.g., 2+2, sqrt(16), (5*3)/2).
  • Automatically evaluates and returns the result.
  • Supports Enter key to submit (just like pressing "Send").
  • Handles invalid inputs with user-friendly error messages.
  • Auto-scrolls the chat so the latest message is always visible.

🛠️ Tech Stack

  • HTML5 – structure
  • CSS3 – styling
  • JavaScript (Vanilla) – logic
  • Math.js – math expression evaluation

📂 Project Structure


├── index.html     # Main HTML file
├── styles.css     # Styles for the chat UI
├── script.js      # JavaScript logic (chat + math evaluation)
└── README.md      # Project documentation


⚡ How to Use

  1. Clone this repository:

    git clone https://github.com/Rakshitgupta9/MathBot.git
  2. Navigate into the project folder:

    cd math-bot
  3. Open index.html in your browser.


💡 Example Usage

  • Input:

    5 * (2 + 3)
    
  • Output:

    25
    

🎯 Future Improvements

  • Add support for multiline inputs (Shift + Enter for new line).
  • Improve styling with animations.
  • Add history persistence (local storage).
  • Support for more advanced math (graphs, matrices, etc.).

🔗 Built By - My Portfolio using JavaScript and math.js.

About

Its a Tool for solving mathematical Expressions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published