Linear Equations

Size
2,122 Kb
Views
4,048

How do I make an linear equations?

What is a linear equations? How do you make a linear equations? This script and codes were developed by Anthony Keithley on 24 December 2022, Saturday.

Linear Equations Previews

Linear Equations - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Linear Equations</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="container">
<h1>Linear Equations</h1>
<h2>Given a linear function in any form, find the slope, x-intercept, and y-intercept</h2> <div class="inputs"> <h3>Slope-intercept Form: y = mx + b</h3> <h3>y = <input class="input" type="number" id="m"> x + <input class="input" type="number" id="b"> </h3> <br> <button onclick="slopeIntercept()">Find slope and intercepts</button> <p>Slope: <span id="slopeInterceptSlope"></span></p> <p>Intercepts: <span id="slopeInterceptIntercepts"></span></p> </div> <div class="inputs"> <h3>Standard Form: Ax + By = C</h3> <h3><input class="input" type="number" id="A"> x + <input class="input" type="number" id="B"> y = <input class="input" type="number" id="C"> </h3> <br> <button onclick="standard()">Find slope and intercepts</button> <p>Slope: <span id="standardSlope"></span></p> <p>Intercepts: <span id="standardIntercepts"></span></p> </div> <div class="inputs"> <h3>Point-Slope Form: y - y<sub>1</sub> = m(x - x<sub>1</sub>)</h3> <h3>y - <input class="input" type="number" id="y1"> = <input class="input" type="number" id="M"> (x - <input class="input" type="number" id="x1"> )</h3> <br> <button onclick="pointSlope()">Find slope and intercepts</button> <p>Slope: <span id="pointSlopeSlope"></span></p> <p>Intercepts: <span id="pointSlopeIntercepts"></span></p> </div>
</div> <script src="js/index.js"></script>
</body>
</html>

Linear Equations - Script Codes CSS Codes

.input { width: 40px;
}
.inputs{ width: 30%; float: left; padding: 10px
}

Linear Equations - Script Codes JS Codes

function slopeIntercept(){ var slope = document.getElementById("m").value; var yInt = document.getElementById("b").value; var xInt = -yInt / slope; document.getElementById("slopeInterceptSlope").innerHTML = slope; document.getElementById("slopeInterceptIntercepts").innerHTML = "(" + xInt + ", 0) " + " and (0, " + yInt + ")";
}
function standard(){ var A = document.getElementById("A").value; var B = document.getElementById("B").value; var C = document.getElementById("C").value; var slope = -A / B; var yInt = C / B; var xInt = C / A; document.getElementById("standardSlope").innerHTML = slope; document.getElementById("standardIntercepts").innerHTML = "(" + xInt + ", 0) " + " and (0, " + yInt + ")";
}
function pointSlope(){ var y1 = document.getElementById("y1").value; var slope = document.getElementById("M").value; var x1 = document.getElementById("x1").value; var yInt = -x1 * slope + y1; var xInt = x1 - y1 / slope; document.getElementById("pointSlopeSlope").innerHTML = slope; document.getElementById("pointSlopeIntercepts").innerHTML = "(" + xInt + ", 0) " + " and (0, " + yInt + ")";
}
Linear Equations - Script Codes
Linear Equations - Script Codes
Home Page Home
Developer Anthony Keithley
Username KeithleySLHS
Uploaded December 24, 2022
Rating 3
Size 2,122 Kb
Views 4,048
Do you need developer help for Linear Equations?

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!

Anthony Keithley (KeithleySLHS) Script Codes
Create amazing blog posts with AI!

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!