Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Study the following HTML and Javascript code, and finish the following converter

ID: 3592926 • Letter: S

Question

Study the following HTML and Javascript code, and finish the following converter in HTML and Javascript. (1) Convert Fahrenheit to Celsius (2) Convert Celsius to Fahrenheit; (3) Convert Kilograms to Pounds"; (4) Convert Pounds to Kilograms" (5) Convert Meters to Yards (6) Convert Yards to Meters" (7) Convert Square Feet to Acres" (8) Convert Acres to Square Feet" (10) Convert Grams to Ounces" (10) Convert Ounces to Grams ISample code IDOCTYPE html> chtml> chead> function temp (form) if ( != "" form-celsius . value ) form.fahrenheit.value form.celsius.value 1.8+32; else if ( form . fahrenheit . value !--") form.celsius.value (form.fahrenheit.value 3 5/9; function tempClear (form) form. celsius . value = ""; form.fahrenheit.value; body> form> Celsius: Fahrenheit: input type. "text" size-"15 name"fahrenheit"> kinput type-"button" value-" Convert onclick-"temp(this.form)"> /html>

Explanation / Answer

1. FAHRENHEIT TO CELSIUS

<!DOCTYPE html>
<html>
<title>Fahrenheit to Celcius Temperature Converter</title>
<body>

<h2>Temperature Converter</h2>
<p>Type a value in the Fahrenheit field to convert the value to Celcius:</p>

<p>
<label>Fahrenheit</label>
<input id="inputFahrenheit" type="number" placeholder="Fahrenheit">
</p>
<p>Celcius: <span id="outputCelcius"></span></p>

<script>
function temperatureConverter(valNum) {
valNum = parseFloat(valNum);
document.getElementById("outputCelcius").innerHTML=(valNum-32)/1.8;
}
</script>

</body>
</html>

2. CELSIUS TO FAHRENHEIT

<!DOCTYPE html>
<html>
<title>Celsius to Fahrenheit Temperature Converter</title>
<body>

<h2>Temperature Converter</h2>
<p>Type a value in the Celsius field to convert the value to Fahrenheit:</p>

<p>
<label>Celsius</label>
<input id="inputCelsius" type="number" placeholder="Celsius">
</p>
<p>Fahrenheit: <span id="outputFahrenheit"></span></p>

<script>
function temperatureConverter(valNum) {
valNum = parseFloat(valNum);
document.getElementById("outputFahrenheit").innerHTML=(valNum*1.8)+32;
}
</script>

</body>
</html>

3. KILOGRAMS TO POUNDS

<!DOCTYPE html>
<html>
<title>Kilograms to Pounds Weight Converter</title>
<body>

<h2>Weight Converter</h2>
<p>Type a value in the Kilograms field to convert the value to Pounds:</p>

<p>
<label>Kilograms</label>
<input id="inputKilograms" type="number" placeholder="Kilograms">
</p>
<p>Pounds: <span id="outputPounds"></span></p>

<script>
function weightConverter(valNum) {
document.getElementById("outputPounds").innerHTML=valNum*2.2046;
}
</script>

</body>
</html>

4. POUNDS TO KILOGRAMS

<!DOCTYPE html>

<html>
<title>Pounds to Kilograms Weight Converter</title>
<body>

<h2>Weight Converter</h2>
<p>Type a value in the Pounds field to convert the value to Kilograms:</p>

<p>
<label>Pounds</label>
<input id="inputPounds" type="number" placeholder="Pounds">
</p>
<p>Kilograms: <span id="outputKilograms"></span></p>

<script>
function weightConverter(valNum) {
document.getElementById("outputKilograms").innerHTML=valNum/2.2046;
}
</script>

</body>
</html>

5. METERS TO YARDS

<!DOCTYPE html>
<html>
<title>Meters to Yards Length Converter</title>
<body>

<h2>Length Converter</h2>
<p>Type a value in the Meters field to convert the value to Yards:</p>

<p>
<label>Meters</label>
<input id="inputMeters" type="number" placeholder="Meters">
</p>
<p>Yards: <span id="outputYards"></span></p>

<script>
function LengthConverter(valNum) {
document.getElementById("outputYards").innerHTML=valNum*1.0936;
}
</script>
</body>
</html>

6. YARDS TO METER

<!DOCTYPE html>
<html>
<title>Yards to Meters Length Converter</title>
<body>

<h2>Length Converter</h2>
<p>Type a value in the Yards field to convert the value to Meters:</p>

<p>
<label>Yards</label>
<input id="inputYards" type="number" placeholder="Yards">
</p>
<p>Meters: <span id="outputMeters"></span></p>

<script>
function LengthConverter(valNum) {
document.getElementById("outputMeters").innerHTML=valNum/1.0936;
}
</script>
</body>
</html>

7. SQUARE FEET TO ACRES

<!DOCTYPE html>
<html>
<body>

<h2>Length Converter</h2>
<p>SQUARE FEET TO ARCS</p>

<p>
<label>Y</label>
<input id="inputYards" type="number" placeholder="Y">
</p>
<p>Meters: <span id="output"></span></p>

<script>
function LengthConverter(valNum) {
document.getElementById("outputMeters").innerHTML=valNum * valNum/43560;
}
</script>
</body>
</html>

8. ACRES TO SQUARE FEET

<!DOCTYPE html>
<html>
<body>

<h2>Length Converter</h2>
<p>SQUARE FEET TO ARCS</p>

<p>
<label>Y</label>
<input id="inputYards" type="number" placeholder="Y">
</p>
<p>Meters: <span id="output"></span></p>

<script>
function LengthConverter(valNum) {
document.getElementById("outputMeters").innerHTML=valNum *43560;
}
</script>
</body>
</html>

9. OUNCES to GRAMS

<!DOCTYPE html>
<html>
<title>Ounces to Grams Weight Converter</title>
<body>

<h2>Weight Converter</h2>
<p>Type a value in the Ounces field to convert the value to Grams:</p>

<p>
<label>Ounces</label>
<input id="inputOunces" type="number" placeholder="Ounces">
</p>
<p>Grams: <span id="outputGrams"></span></p>

<script>
function weightConverter(valNum) {
document.getElementById("outputGrams").innerHTML=valNum/0.035274;
}
</script>

</body>
</html>

10. GRAMS TO  OUNCES

<!DOCTYPE html>
<html>
<title>Grams to Ounces Weight Converter</title>
<body>

<h2>Weight Converter</h2>
<p>Type a value in the Grams field to convert the value to Ounces:</p>

<p>
<label>Grams</label>
<input id="inputGrams" type="number" placeholder="Grams">
</p>
<p>Ounces: <span id="outputOunces"></span></p>

<script>
function weightConverter(valNum) {
document.getElementById("outputOunces").innerHTML=valNum*0.035274;
}
</script>

</body>
</html>