diff --git a/Calculators/Momentum-With-Time-Calculator/README.md b/Calculators/Momentum-With-Time-Calculator/README.md new file mode 100644 index 000000000..7bab8d6c0 --- /dev/null +++ b/Calculators/Momentum-With-Time-Calculator/README.md @@ -0,0 +1,35 @@ +#

Momentum With Time Calculator

+ +## Description :- + +The Momentum With Time Calculator is a web application designed to calculate the momentum of an object or a body with its given force and time, dynamically on the webpage. + +## Tech Stacks :- + +- HTML +- CSS +- JavaScript + +## Features :- + +- Calculate the momentum of a body based on the user input. +- Applicable to all types of units. +- User-friendly interface with modern styling and animations. + +## How It Works :- + +1. **Input Force** + - Enter the force of the body. + +2. **Input Time** + - Enter the Time of the body. + +3. **Calculate Momentum** + - Click the "Calculate" button to get the momentum. + +4. **Result** + - The application will display the result of the calculation, i.e., the final momentum of the body. + +## Screenshots :- + +![Screenshot 2024-07-31 120129](https://github.com/user-attachments/assets/0f578db5-c877-487b-92c1-51a088ce3e02) diff --git a/Calculators/Momentum-With-Time-Calculator/index.html b/Calculators/Momentum-With-Time-Calculator/index.html new file mode 100644 index 000000000..8a03ef7a7 --- /dev/null +++ b/Calculators/Momentum-With-Time-Calculator/index.html @@ -0,0 +1,27 @@ + + + + + + + + Momentum With Time Calculator + + + +
+

Momentum With Time Calculator

+ + +
+ + + + + +
+
+ + + + \ No newline at end of file diff --git a/Calculators/Momentum-With-Time-Calculator/script.js b/Calculators/Momentum-With-Time-Calculator/script.js new file mode 100644 index 000000000..4016cd3dc --- /dev/null +++ b/Calculators/Momentum-With-Time-Calculator/script.js @@ -0,0 +1,24 @@ +function calculateM() { + // Get the input values + var force = parseFloat(document.getElementById("force").value); + var time = parseFloat(document.getElementById("time").value); + + // Validate input + if (isNaN(force) || isNaN(time)) { + alert("Please enter valid numbers."); + return; + } + + // Calculate momentum + var mom = (force * time); + + // Display the result + var resultElement = document.getElementById("result"); + resultElement.innerHTML = ` +
+ +
Momentum: ${mom.toFixed(2)}
+ +
+ `; +} \ No newline at end of file diff --git a/Calculators/Momentum-With-Time-Calculator/style.css b/Calculators/Momentum-With-Time-Calculator/style.css new file mode 100644 index 000000000..a39a5df88 --- /dev/null +++ b/Calculators/Momentum-With-Time-Calculator/style.css @@ -0,0 +1,85 @@ +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background: linear-gradient(to bottom right, #3fbaf3, #b91149); + margin: 0; + display: flex; + align-items: center; + justify-content: center; + height: 100vh; +} + +.calculator-container { + background-color: #fff; + padding: 30px; + border-radius: 12px; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); + text-align: center; + animation: fadeInUp 0.8s ease-out; +} + +button { + background-color: #4caf50; + color: #fff; + padding: 15px 30px; + border: none; + border-radius: 6px; + cursor: pointer; + font-size: 18px; + margin-top: 20px; + transition: background-color 0.3s ease, transform 0.2s ease-out; +} + +button:hover { + background-color: #45a049; + transform: scale(1.05); +} + +input, +select { + padding: 15px; + margin: 15px 0; + width: 80%; + box-sizing: border-box; + font-size: 18px; + border: 1px solid #ccc; + border-radius: 6px; + transition: border-color 0.3s ease, transform 0.2s ease-out; +} + +input:focus, +select:focus { + outline: none; + border-color: #4caf50; + transform: scale(1.02); +} + +.result-container { + font-size: 20px; + font-weight: bold; + color: #333; + margin-top: 20px; + animation: fadeIn 1s ease-out; +} + +/* Animations */ +@keyframes fadeInUp { + from { + opacity: 0; + transform: translateY(20px); + } + + to { + opacity: 1; + transform: translateY(0); + } +} + +@keyframes fadeIn { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} \ No newline at end of file diff --git a/index.html b/index.html index 770b7ae8b..c3b86b57a 100644 --- a/index.html +++ b/index.html @@ -3039,6 +3039,20 @@

Calculates the momentum of the body using its mass and velocity.

+
+
+

Momentum With Time Calculator

+

Calculates the momentum of the body using its force and time.

+ +
+

Mortgage Refinance Calculator