Skip to content

abderrahim1210/speed-calculator

Repository files navigation

🏎️ Speed Calculator (JavaScript)

A simple web application to calculate speed using JavaScript, HTML, and CSS. The user inputs distance and time, and the app calculates and displays the speed instantly.

πŸš€ Features

- Calculates speed using the formula:  
  **Speed = Distance Γ· Time**
- Simple and user-friendly interface
- Input validation
- Support for different units (e.g., km/h, m/s)

πŸ› οΈ Technologies Used

- HTML5
- CSS3
- JavaScript (Vanilla)

πŸ“Έ Screenshots

> *(Add screenshots of the interface here if available)*

πŸ“¦ How to Use

1. **Download or Clone the Project**  
   Download the files or clone the repository to your local machine.

2. **Open `index.html`** in your web browser.

3. **Enter Data**  
   - Enter the distance (e.g., 100 km)
   - Enter the time (e.g., 2 hours)
   - Click the "Calculate Speed" button

4. **View Result**  
   The calculated speed will be displayed below the form.

πŸ“ Example

If you input:
- **Distance:** 150 km  
- **Time:** 3 hours  

The result will be:  
**Speed = 50 km/h**

πŸ“ Project Structure

speed-calculator/
β”œβ”€β”€ speed-calculator.html
β”œβ”€β”€ speed-calculator.css
└── speed-calculator.js

πŸ“Œ Notes

- Make sure to input valid numbers for both distance and time.
- Speed cannot be calculated if time is zero.

πŸ§‘β€πŸ’» Developer

- **Name:** *(Abderrahim)*
- **GitHub:** (https://github.com/abderrahim1210)

πŸ“„ License

This project is open source and available under the MIT License.