Quadratic
How do I make an quadratic?
What is a quadratic? How do you make a quadratic? This script and codes were developed by Anthony Keithley on 24 December 2022, Saturday.
Quadratic - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Quadratic</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="container">
<h1>Quadratic Root Finder</h1>
<h2>Given a quadratic function in the form of y = ax<sup>2</sup>+bx+c, enter the values for a, b, and c below to find the real roots of the function.</h2> <div id="inputs">
<h3>y = <input type="number" id="a" value="1"> x<sup>2</sup> + <input type="number" id="b" value="3"> x +
<input type="number" id="c" value="2"> </h3> <br>
<br>
<button onclick="findRoots()">Find roots</button>
<p>Roots: <span id="roots"></span></p> </div> <div id="calculator" style="width: 600px; height: 400px;"></div> </div>
<script src="https://www.desmos.com/api/v0.8/calculator.js?apiKey=dcb31709b452b1cf9dc26972add0fda6"></script> <script src="js/index.js"></script>
</body>
</html>
Quadratic - Script Codes CSS Codes
#container { width: 600px; margin: 0px auto; text-align: center;
}
h1, h2 { text-align: center;
}
input { width: 30px;
}
body { color: white; background: darkslategray;
}
Quadratic - Script Codes JS Codes
var elt = document.getElementById('calculator');
var calculator = Desmos.GraphingCalculator(elt);
function findRoots(){ var a = document.getElementById("a").value; var b = document.getElementById("b").value; var c = document.getElementById("c").value; var roots, x1, x2; var disc = b*b - 4*a*c; x1 = ((-b) + Math.sqrt(disc))/ (2 * a); x2 = ((-b) - Math.sqrt(disc))/ (2 * a); if(disc < 0){ roots = "No solution"; } else if(x1 == x2){ roots = "(" + x1 + ", 0)"; } else { roots = "(" + x1 + ", 0)" + " and " + "(" + x2 + ", 0)"; } document.getElementById("roots").innerHTML = roots; calculator.setExpression({id:'graph1', latex:'y=' + a + 'x^2+' + b + 'x+' + c});
}
Developer | Anthony Keithley |
Username | KeithleySLHS |
Uploaded | December 24, 2022 |
Rating | 3 |
Size | 2,234 Kb |
Views | 6,072 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Organizing Your HTML | 1,676 Kb |
Age Calculator | 1,488 Kb |
GetRekt | 2,206 Kb |
Padding and Margin | 0 Kb |
A Pen by Anthony Keithley | 3,400 Kb |
MuchoMatho | 2,219 Kb |
Animations | 1,595 Kb |
News | 1,152 Kb |
Dashboard | 2,803 Kb |
5-2-17 | 1,685 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Underlined form fields | Mitchdot | 2,323 Kb |
CSS Link Icons with jQuery Titles | Nicwinn | 2,312 Kb |
Css3 loader | Clknap | 2,391 Kb |
Reading Grid | Tappily | 4,306 Kb |
Sexy Social Buttons | Ipiyale | 2,226 Kb |
Kudos Please | TimPietrusky | 6,624 Kb |
Practice using Wixel | Emnk | 3,057 Kb |
Pink expansion tunnel | Vez | 1,738 Kb |
Click Based Rotation Demo | Zeaklous | 2,086 Kb |
Ball bouncing loading animation | Adam2326 | 3,144 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!