JAVASCRIPT HOMEWORK PLEASE HELP!
ask the user to input their temperature.
Use this information to determine if the person has a fever (above 98.6), hypothermia (below 95), or a normal temperature (98.6)
If the user’s temperature is normal congratulate them on their health and end the program.
If not, give the user advice on how to treat their condition.
Continue checking the user’s temperature until they feel better.
Find out if the user feels better. If so, end the program. If not, ask them to take their temperature again and repeat the process until they do.
Dear Student ,
As per requirement submitted above kindly find below solution.
Here new web page with name "temperature.html" is created which contains below code.
temperature.html :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- title for web page -->
<title>Temperature checking</title>
</head>
<body>
<!-- <script> is used for javascript -->
<script>
var flag = true;//variable used for flag
while (flag) {
//asking user temperature
var temp = parseFloat(prompt("Enter temperature", "temperature"));
//checking temperature
if (temp > 98.6) {
//if temperature is greater then 98.6 then alert user
alert(temp + " means you have a fever");
}
else if (temp >= 95 && temp <= 98.6) {
//if temperature is normal
//when temperature is greater than or equal to 95
//and less than or equal to 98.6
alert("Congratulation you have " + temp + " temperature means its normal");
flag = false;//set the flag
}
else if (temp < 95) {
//if temperature is less than 95 then
alert(temp + " temperature means you have " + hypothermia);
}
}
</script>
</body>
</html>
==================================
Output :Open web page temperature.html in the browser and will get the screen as shown below.
Screen 1:Screen asking user temperature
Screen 2:Screen showing health report
Screen 3:
NOTE :PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.
JAVASCRIPT HOMEWORK PLEASE HELP! ask the user to input their temperature. Use this information to determine...
Write a JAVASCRIPT program that will help an elementary school student learn multiplication. Use the Random method to produce two positive one-digit integers. The program should then prompt the user with a question using random numbers, such as How much is 6 times 7? The student then inputs the answer. Next, the program checks the student’s answer. If it is correct, display the message "Very good!" and ask whether the student wants to continue if so then ask another multiplication...
In C++ program Fishing Game Simulation For this assignment, you will write a program that simulates a fishing game. In this game, a six-sided die is rolled to determine what the user has caught. Each possible item is worth a certain number of fishing points. The points will not be displayed until the user has finished fishing, and then a message is displayed congratulating the user depending on the number of fishing points gained. Here are some suggestions for the...
Java programming for ticket price calculator. It should ask the user if they would like to process another ticket order. They should indicate their selection with a Y or N. If they indicate yes, then it should repeat the entire program with the exception of the welcome screen. If they indicate no, it should show the final thank you message and end the program. If they indicate an invalid answer, it should display an error and re-prompt them for a Y...
MATLAB HOMEWORK QUESTION DUE TOMORROW: PLEASE HELP!!! The viscosity of blood depends on many factors (temperature, hematocrit, blood vessel diameter, blood velocity). As such, there isn’t a single formula for calculating blood viscosity. Instead you can interpolate based on formulas and data found in tables. Your job is to design a program to calculate blood viscosity. The key features of the program are: It must ask the user for temperature, hematocrit, blood vessel diameter, and blood velocity. For each of...
This program will ask the user to enter a number of players, then ask the user for each player's name and score. Once all of the players have been entered, the program will display a bar chart with each of their scores scaled as a percentage of the maximum score entered. See below for details on exactly how this should work - an example transcript of how the program should work is shown below (remember that values entered by the...
Homework 3: Input Validation 1 Objectives control structures console-based user input using Scanner class writing complete programs using two classes: client and supplier 2 User Interface Specification This is a console-based I/O program. Display should go to System.out (print or println) and the program will get user input using the Scanner class. The flow of execution should be as follows: When the program starts, display a one-line introduction to the user Display a menu with 5 options 1. validate zip...
Java 1 Some help Please...... 1. Before You Begin Anticipate where things can go wrong Consider how to gracefully shut down the program and save the users data and close files properly. Typically there are two scenarios to make a distinction between: The first is one that which you have absolutely no control over; such as if all the files are where they should be, and that the user has not deleted one or accidentally moved it rather than copied...
java In this project you will implement a trivia game. It will ask random trivia questions, evaluate their answers and keep score. The project will also have an administrative module that will allow for managing the question bank. Question bank management will include adding new questions, deleting questions and displaying all of the questions, answers and point values. 2. The project can be a GUI or a menu based command line program. 3. Project details 1. Create a class to...
java In this project you will implement a trivia game. It will ask random trivia questions, evaluate their answers and keep score. The project will also have an administrative module that will allow for managing the question bank. Question bank management will include adding new questions, deleting questions and displaying all of the questions, answers and point values. 2. The project can be a GUI or a menu based command line program. 3. Project details 1. Create a class to...
*****Can someone please HELP me with this assignment please, I am struggling with this assignment and would appreciate some help, needs to be done in c/c++ ******* (100 marks) In this problem, you will write a file transfer program for transferring files between two computers connected by a network. The protocol that you will implement is called the Simple File Transfer Protocol (SFTP). The complete description for SFTP is given below. PART 1 SFTP is a simple protocol for transferring...