add previous assignment

This commit is contained in:
2023-03-14 09:48:18 -05:00
parent 512bd81c21
commit 40aeb32212
105 changed files with 2715 additions and 8 deletions

View File

@@ -0,0 +1,29 @@
<!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>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript">
var input = prompt("Please enter a temperature to convert!");
var toCelcius = prompt("Do you want to convert to celcius?");
if (toCelcius == "true" || toCelcius == "yes") {
var celcius = 5 / 9 * (input - 32);
document.write( input +" in Celcius is " + celcius + "C");
response();
} else {
var fahrenheit = (input * 5/9) + 32;
document.write(input + "in Fahrenheit is " + fahrenheit + "F");
}
function response() {
if (fahrenheit <= 0 || celcius <= -18) {
document.write("Bundle up! It's really cold out there!");
}
}
</script>
</head>
</html>

View File

@@ -0,0 +1,23 @@
<!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>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript">
var input = prompt("Please enter a temperature to convert!");
var toCelcius = prompt("Do you want to convert to celcius?");
if (toCelcius == "true" || toCelcius == "yes") {
var celcius = 5 / 9 * (input - 32);
document.write( input +" in Celcius is " + celcius + "C");
} else {
var fahrenheit = (input * 5/9) + 32;
document.write(input + "in Fahrenheit is " + fahrenheit + "F")
}
</script>
</head>
</html>

View File

@@ -0,0 +1,15 @@
<!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>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript">
</script>
</head>
</html>