Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a JavaScript program that converts a temperature from Fahrenheit to Celsius. Requirements: You are to create a folder that contains an index.html file and

Write a JavaScript program that converts a temperature from Fahrenheit to Celsius. Requirements: You are to create a folder that contains an index.html file and a separate JavaScript file. These should be only two files in the folder.

Your program is to use the prompt function to read degrees Fahrenheit. o A default value of 32 should be displayed.

Your program should validate the input.

o Valid inputs include any number greater than or equal to absolute zero, which is -459.67 F.

o Valid input also includes the single lower-case letter "q".

o If a number less that absolute zero is entered, your program should display an alert that says Temperature cannot be less than absolute zero (- 459.67 F) o If any string other than the lower-case letter "q" is entered, your program should display an alert that says Invalid entry, enter a number or "q"

If the user enters the letter "q", then the program should stop.

If the user enters a number, the program converts it to Celsius and writes a line of output to the document (see the video referenced below for what the final output should look like).

All numeric output should be rounded to one decimal place.

See the video at https://youtu.be/teW9p3ZwxMM for a demo of the program and further details about the assignment requirements.

What to Turn In: submit a single zip file that has one folder containing all the files

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions

Question

Explain the factors affecting dividend policy in detail.

Answered: 1 week ago

Question

Explain walter's model of dividend policy.

Answered: 1 week ago

Question

3. Job rotation is used for all levels and types of employees.

Answered: 1 week ago