aasdfasdfasdfasdfasdf
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this template
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Table Generator</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script>
|
||||
document.write("<table>");
|
||||
// Write table header
|
||||
document.write("<tr><th>Trip Name</th><th>Miles Driven</th><th>Gallons Used</th><th>Miles Per Gallon</th></tr>");
|
||||
do {
|
||||
var tripName = prompt("Enter data for Trip Name collum");
|
||||
var milesDriven = prompt("Enter data for Miles driven collum");
|
||||
var gallonsUsed = prompt("Enter data for Gallons used collum");
|
||||
var mpg = prompt("Enter data for Miles Per Gallon collum");
|
||||
document.write("<tr>");
|
||||
document.write("<td>" + tripName + "</td>");
|
||||
document.write("<td>" + milesDriven + " Mi. </td>");
|
||||
document.write("<td>" + gallonsUsed + " gallons</td>");
|
||||
document.write("<td>" + mpg + " MPG</td>");
|
||||
document.write("</tr>");
|
||||
var iterate = prompt("add more data? (Type true/false)");
|
||||
} while (iterate === "true");
|
||||
document.write("</table>");
|
||||
</script>
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 1px solid;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
</html>
|
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/html.html to edit this template
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>TODO supply a title</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script>
|
||||
var input = prompt("Enter a number to calculate its factorial.");
|
||||
var output = 1;
|
||||
for (var i = input; i > 1; i--) {
|
||||
output *= i;
|
||||
}
|
||||
document.write("The factorial of " + input + " is " + output);
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/html.html to edit this template
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Bacteria cultivation calculator</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 1px solid;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var initialBacteria = prompt("Enter the initial bacteria.");
|
||||
var bacteria = initialBacteria;
|
||||
document.write("<table>");
|
||||
// Write table header
|
||||
document.write("<tr><th>Initial Bacteria Present:</th><th>"+initialBacteria +"</th></tr>");
|
||||
document.write("<tr><th>Bacteria</th><th>Day</th></tr>");
|
||||
for (var i = 1; i <= 10; i++) {
|
||||
document.write("<tr>");
|
||||
bacteria = initialBacteria * Math.pow(2, (i / 10)) ;
|
||||
bacteria = Math.trunc(bacteria);
|
||||
document.write("<td>" + bacteria + "</td>");
|
||||
document.write("<td>" + i + "</td>");
|
||||
document.write("</tr>");
|
||||
}
|
||||
document.write("</table>");
|
||||
</script>
|
||||
</head>
|
||||
|
||||
</html>
|
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/html.html to edit this template
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>TODO supply a title</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 1px solid;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var name, attendance, homework, midterm, final, grade, iterate;
|
||||
document.write("<table>");
|
||||
// Write table header
|
||||
document.write("<tr><th>Name</th><th>Attendance</th><th>Homework</th><th>Midterm</th><th>Final</th><th>Course Grade</th></tr>");
|
||||
do {
|
||||
name = prompt("Enter name:");
|
||||
attendance = prompt("Enter attendance grade:");
|
||||
homework = prompt("Enter homework grade:");
|
||||
midterm = prompt("Enter midterm grade:");
|
||||
final = prompt("Enter final grade:");
|
||||
iterate = prompt("Done entering data? (Type true/false)");
|
||||
grade = (midterm*0.3)+(final*0.4)+(homework*0.2)+(attendance*0.1);
|
||||
document.write("<tr>");
|
||||
document.write("<td>" + name + "</td>");
|
||||
document.write("<td>" + attendance + "</td>");
|
||||
document.write("<td>" + homework + "</td>");
|
||||
document.write("<td>" + midterm + "</td>");
|
||||
document.write("<td>" +final + "</td>");
|
||||
document.write("<td>" + grade + "</td>");
|
||||
document.write("</tr>");
|
||||
} while (iterate === "false");
|
||||
document.write("</table>");
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
Reference in New Issue
Block a user