Basic Equation Generator

Developer
Size
2,810 Kb
Views
20,240

How do I make an basic equation generator?

What is a basic equation generator? How do you make a basic equation generator? This script and codes were developed by AppleCrazy on 23 September 2022, Friday.

Basic Equation Generator Previews

Basic Equation Generator - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Basic Equation Generator</title> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-75364115-2', 'auto'); ga('send', 'pageview');
</script> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>$$\text{Basic Equation Generator}$$</h1>
<p>$$\text{Find all relevant points and graph the function below.}$$</p>
<p>$$\text{Then, describe the transformation from the parent function.}$$</p>
<p>$$\text{Click/tap on the problem for another one.}$$</p>
<div class="problem" id="prb"></div>
<br />
<p>$$\text{*Some of these may be trick questions, so be watchful.}$$</p>
<br />
<h2>$$ \textbf{Changelog} $$</h2>
<ul style="list-style:none"> <li>$$\textbf{10/3/2016}\ \text{Added more quadratic forms...}$$</li>
</ul>
<footer><p>$$\text{Software copyright 2016 AppleCrazy. All rights reserved.}$$</p></footer> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script>
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML'></script> <script src="js/index.js"></script>
</body>
</html>

Basic Equation Generator - Script Codes CSS Codes

body { text-align: center; width: 100vw; height: 100vh; margin: 0;
}
.problem { font-size: 3rem;
}

Basic Equation Generator - Script Codes JS Codes

function randomFrom(array) { return array[Math.floor(Math.random() * array.length)];
}
function ri(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min;
}
function toStr(num) { var sign; if (num >= 0) { sign = "+"; } else { sign = ""; } return sign + num;
}
function leading(n) { var m = n; if (m == 1) { m = ""; } if (m == -1) { m = "-"; } return m;
}
// function validate() {
// var args = [...arguments];
// if ()
// }
var mathrand = { write: function(what) { $(document).append(what); }, linear: function() { var m = leading(ri(-9, 9)); var b = toStr(ri(-15, 15)); $(".problem").text("$$ f(x) = " + m + "x" + b + "$$"); }, quadratic: function() { var a = leading(ri(-9, 9)); var b = toStr(ri(-10, 10)); var c = toStr(ri(-8, 8)); $(".problem").text(`$$ f(x) = ${a}x^2 ${b}x ${c} $$`); }, quadraticVert: function() { var a = leading(ri(-9, 9)); var h = toStr(ri(-10, 10)); var k = toStr(ri(-8, 8)); $(".problem").text(`$$ f(x) = ${a}(x${h})^2 ${k} $$`); }, abv: function() { var a = leading(ri(-9, 9)); var h = toStr(ri(-10, 10)); var k = toStr(ri(-8, 8)); $(".problem").text(`$$ f(x) = ${a}|x${h}| ${k} $$`); }
};
function generate() { var func = randomFrom(['linear', 'quadratic','quadraticVert', 'abv']); eval("mathrand." + func + "()"); MathJax.Hub.Queue(["Typeset", MathJax.Hub, "prb"]);
}
$(function() { generate(); $('body').click(generate); $(window).keypress(function(e) { if (e.keyCode === 0 || e.keyCode === 32) { e.preventDefault() generate(); } })
});
Basic Equation Generator - Script Codes
Basic Equation Generator - Script Codes
Home Page Home
Developer AppleCrazy
Username applecrazy
Uploaded September 23, 2022
Rating 3
Size 2,810 Kb
Views 20,240
Do you need developer help for Basic Equation Generator?

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!

AppleCrazy (applecrazy) Script Codes
Create amazing marketing copy 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!