From efeb3add53607e29484e20edec8ad379b87d96bb Mon Sep 17 00:00:00 2001 From: Suhaina Fathima M <153417476+SuhainaFathimaM@users.noreply.github.com> Date: Sat, 10 Aug 2024 17:48:11 +0530 Subject: [PATCH 1/9] Create index.html --- .../index.html | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Calculators/falling-under-gravity-calculator/index.html diff --git a/Calculators/falling-under-gravity-calculator/index.html b/Calculators/falling-under-gravity-calculator/index.html new file mode 100644 index 000000000..d8c35a63c --- /dev/null +++ b/Calculators/falling-under-gravity-calculator/index.html @@ -0,0 +1,27 @@ + + + + + + Falling Object Under Gravity Calculator + + + +
+

Falling Object Calculator

+
+ + +
+ +
+
+ This calculator estimates the time and speed of a free-falling object under gravity (9.81 m/s²), neglecting air resistance. +
+
+
+
+
+ + + From a8184abf289633e675f06f08994e559d30de61aa Mon Sep 17 00:00:00 2001 From: Suhaina Fathima M <153417476+SuhainaFathimaM@users.noreply.github.com> Date: Sat, 10 Aug 2024 17:48:44 +0530 Subject: [PATCH 2/9] Create style.css --- .../style.css | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 Calculators/falling-under-gravity-calculator/style.css diff --git a/Calculators/falling-under-gravity-calculator/style.css b/Calculators/falling-under-gravity-calculator/style.css new file mode 100644 index 000000000..78788ee76 --- /dev/null +++ b/Calculators/falling-under-gravity-calculator/style.css @@ -0,0 +1,154 @@ +body { + font-family: 'Arial', sans-serif; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + min-height: 100vh; + background: linear-gradient(to right, #6b11cbb6, #fc2594); + color: #333; + overflow: auto; + } + + .container { + background-color: #ffffff41; + padding: 60px 80px; + border-radius: 20px; + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); + text-align: center; + width: 600px; + max-width: 90%; + position: relative; + overflow: auto; + } + + h1 { + color: #333; + margin-bottom: 30px; + font-size: 3em; + text-shadow: 0 3px 6px rgba(0, 0, 0, 0.2); + text-align: center; + font-weight: bold; + letter-spacing: 2px; + } + + .input-group { + display: flex; + flex-direction: column; + margin-bottom: 20px; + } + + .input-group label { + margin-bottom: 5px; + font-weight: bold; + font-size: 1.2em; + } + + input[type="number"] { + width: calc(100% - 22px); + padding: 15px; + margin: 10px 0; + border: 1px solid #ccc; + border-radius: 8px; + box-sizing: border-box; + font-size: 18px; + transition: border-color 0.3s ease; + } + + input[type="number"]:focus { + outline: none; + border-color: #007bff; + box-shadow: 0 0 5px #007bff; + } + + button { + background-color: #007bff; + color: white; + padding: 15px 30px; + border: none; + border-radius: 8px; + cursor: pointer; + font-size: 18px; + font-weight: bold; + transition: background-color 0.3s ease, transform 0.1s ease; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + } + + button:hover { + background-color: #0056b3; + transform: translateY(-3px); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); + } + + #result { + margin-top: 40px; + font-size: 2.2em; + font-weight: bold; + color: #28a745; + text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + animation: blink 1.2s infinite; + } + + @keyframes blink { + 0% { opacity: 1; } + 50% { opacity: 0.7; } + 100% { opacity: 1; } + } + + .explanation { + margin-top: 30px; + font-size: 1.1em; + color: #df4941; + line-height: 1.6; + } + + .animation-container { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 100%; + height: 100%; + pointer-events: none; + z-index: -1; + } + + .animation-circle { + position: absolute; + width: 150px; + height: 150px; + border-radius: 50%; + background-color: rgba(255, 255, 255, 0.2); + animation: circleAnimation 7s linear infinite; + } + + @keyframes circleAnimation { + 0% { + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + opacity: 1; + } + 100% { + top: 10%; + left: 90%; + transform: translate(-50%, -50%) scale(2.5); + opacity: 0.05; + } + } + + /* Responsive Design (adjust for different screen sizes) */ + @media (max-width: 600px) { + .container { + width: 90%; + padding: 40px 20px; + } + h1 { + font-size: 2.2em; + } + .animation-circle { + width: 100px; + height: 100px; + } + } + From f8a9507358bc98254e6f8577ce514bdb77be3f48 Mon Sep 17 00:00:00 2001 From: Suhaina Fathima M <153417476+SuhainaFathimaM@users.noreply.github.com> Date: Sat, 10 Aug 2024 17:49:12 +0530 Subject: [PATCH 3/9] Create script.js --- .../script.js | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Calculators/falling-under-gravity-calculator/script.js diff --git a/Calculators/falling-under-gravity-calculator/script.js b/Calculators/falling-under-gravity-calculator/script.js new file mode 100644 index 000000000..b1d22f51a --- /dev/null +++ b/Calculators/falling-under-gravity-calculator/script.js @@ -0,0 +1,22 @@ +function calculate() { + const g = 9.81; // Acceleration due to gravity (m/s^2) + const heightInput = document.getElementById('height'); + const resultDiv = document.getElementById('result'); + + const height = parseFloat(heightInput.value); + + if (isNaN(height) || height < 0) { + resultDiv.innerHTML = 'Please enter a valid height.'; + resultDiv.style.color = '#dc3545'; // Change color to red for error + return; + } + + const time = Math.sqrt((2 * height) / g); + const speed = g * time; + + resultDiv.style.color = '#28a745'; // Change color to green for valid result + resultDiv.innerHTML = ` +

Time to fall: ${time.toFixed(2)} seconds

+

Speed: ${speed.toFixed(2)} m/s

+ `; +} From 846d282b8771d238aedb7350736915651fd8453e Mon Sep 17 00:00:00 2001 From: Suhaina Fathima M <153417476+SuhainaFathimaM@users.noreply.github.com> Date: Sat, 10 Aug 2024 17:57:45 +0530 Subject: [PATCH 4/9] Rename index.html to index.html --- .../index.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Calculators/{falling-under-gravity-calculator => Falling-under-gravity-calculator}/index.html (100%) diff --git a/Calculators/falling-under-gravity-calculator/index.html b/Calculators/Falling-under-gravity-calculator/index.html similarity index 100% rename from Calculators/falling-under-gravity-calculator/index.html rename to Calculators/Falling-under-gravity-calculator/index.html From cc82875004f8c43a7ab083f648e2957400daa4d2 Mon Sep 17 00:00:00 2001 From: Suhaina Fathima M <153417476+SuhainaFathimaM@users.noreply.github.com> Date: Sat, 10 Aug 2024 17:58:38 +0530 Subject: [PATCH 5/9] Rename script.js to script.js --- .../script.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Calculators/{falling-under-gravity-calculator => Falling-under-gravity-calculator}/script.js (100%) diff --git a/Calculators/falling-under-gravity-calculator/script.js b/Calculators/Falling-under-gravity-calculator/script.js similarity index 100% rename from Calculators/falling-under-gravity-calculator/script.js rename to Calculators/Falling-under-gravity-calculator/script.js From 960a0f0b561a43947e91cca11a308da8cadc2574 Mon Sep 17 00:00:00 2001 From: Suhaina Fathima M <153417476+SuhainaFathimaM@users.noreply.github.com> Date: Sat, 10 Aug 2024 17:59:26 +0530 Subject: [PATCH 6/9] Rename style.css to style.css --- .../style.css | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Calculators/{falling-under-gravity-calculator => Falling-under-gravity-calculator}/style.css (100%) diff --git a/Calculators/falling-under-gravity-calculator/style.css b/Calculators/Falling-under-gravity-calculator/style.css similarity index 100% rename from Calculators/falling-under-gravity-calculator/style.css rename to Calculators/Falling-under-gravity-calculator/style.css From c92cf3fd7a4eac82abf4562bf1ca1483bd91137c Mon Sep 17 00:00:00 2001 From: Suhaina Fathima M <153417476+SuhainaFathimaM@users.noreply.github.com> Date: Sat, 10 Aug 2024 18:01:55 +0530 Subject: [PATCH 7/9] Create README.md --- .../Falling-under-gravity-calculator/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Calculators/Falling-under-gravity-calculator/README.md diff --git a/Calculators/Falling-under-gravity-calculator/README.md b/Calculators/Falling-under-gravity-calculator/README.md new file mode 100644 index 000000000..89533095b --- /dev/null +++ b/Calculators/Falling-under-gravity-calculator/README.md @@ -0,0 +1,15 @@ +#

Falling Object Under Gravity Calculator

+ +## Description :- + +This calculator estimates the time and speed of a free-falling object under gravity (9.81 m/s²), neglecting air resistance. + +## Tech Stacks :- + +- HTML +- CSS +- JavaScript + +## Screenshots :- + + From d44c27ce49e86e8f084b70247e77e56798087f11 Mon Sep 17 00:00:00 2001 From: Suhaina Fathima M <153417476+SuhainaFathimaM@users.noreply.github.com> Date: Sat, 10 Aug 2024 18:05:16 +0530 Subject: [PATCH 8/9] Update README.md --- Calculators/Falling-under-gravity-calculator/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Calculators/Falling-under-gravity-calculator/README.md b/Calculators/Falling-under-gravity-calculator/README.md index 89533095b..f31986031 100644 --- a/Calculators/Falling-under-gravity-calculator/README.md +++ b/Calculators/Falling-under-gravity-calculator/README.md @@ -13,3 +13,4 @@ This calculator estimates the time and speed of a free-falling object under grav ## Screenshots :- +![Screenshot 2024-08-10 180118](https://github.com/user-attachments/assets/8ad73eb9-36dc-44f0-abd1-61d974a7d382) From b9b763ae1c336c8770efa18b43020ad4f0375ce1 Mon Sep 17 00:00:00 2001 From: Suhaina Fathima M <153417476+SuhainaFathimaM@users.noreply.github.com> Date: Sat, 10 Aug 2024 18:16:10 +0530 Subject: [PATCH 9/9] Update index.html --- index.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/index.html b/index.html index e572db610..33ea4a80a 100644 --- a/index.html +++ b/index.html @@ -2117,6 +2117,20 @@

Calculates the factorial of any large number instantly.

+
+
+

Falling Object Under Gravity Calculator

+

Calculates the time and speed of a free-falling object under gravity.

+ +
+

Fascinating Number Calculator