Become A Nickzom Developer
Write HTML and JavaScript Codes To Be Integrated Into Nickzom Calculator and Get Paid
Nickzom Calculator is a platform that solves calculation problems and displays the parameters, steps and solution accurately and accordingly in order for the user to easily comprehend.
As a Nickzom developer, your task is to look for calculation problems in Mathematics, Physics and Engineering that are not currently on the platform write the codes to solve this calculation problem showing the steps in the order below and get paid to your stipulated bank account at the end of the month once your wallet has a minimum of ₦2500
Simple Interest Interest Principal Time Rate
<!DOCTYPE html> <html> <head> <script type = "text/javascript" src = "{js-file-name}.js"></script> </head> <body> <form action = "#" id = "myForm"> <table class = "pppp" cellpadding = "10px" cellspacing = "10px"> <tr class = "wrapup"> <td>Enter {the parameter}:</td><td><input type = "text" name = "parameter" value = "" id = "parameter" required/></td> </tr> <tr> <td><input type = "button" class = "internalA" id = "buttonPress" value = "Calculate"/></td> </tr> </table> <div id = "result"></div> </form> </body> </html>
function start(){ var button = document.getElementById("buttonPress"); button.addEventListener("click", myButtonPress, false); } function myButtonPress(){ var parameterText = document.getElementById("parameter").value; var parameter = parseFloat(parameterText); // declare and initialize the string that would be appended to the HTML file var result = ""; // check if the parameter is empty if (parameterText === ""){ result += "<p><font color = "red">Nickzom detects an empty text field.</font></p>"; } // check if the parameter is a number else if (isNaN(parameterText)){ result += "<p><font color = "red">Nickzom requires you to enter a numerical value in all text field(s).</font></p>"; } else{ // write codes to perform the computation // display the parameters and what they stand for in the computation // display values the user enter as to the parameters /* For Example: result += "You entered 2.5 as the rate."; */ // display the steps, one by one and accurately for the user to understand. // display the answer } document.getElementById("result").innerHTML = result; } window.addEventListener("load", start, false);