Algorithm We already have an algorithm for Patient Temperature. It will not change. The Algorithm for Patient Temperature: get the temperature implementation: with a prompt box before, now it will come from a widget assess it with conditionals and variables implementation: pretty much the same as before output a user-friendly message implementation: with an alert box or text before, now some text and images Your Mission For each of the two if-statements:    replace false  with the correct conditional expressions for this program to make sense. change each of the three images by finding new urls. <!DOCTYPE html><html><body> 90°<input type="range" min="90" max="110" id="temperature" step=.1 oninput="changeTemp()">110°<p id="assessmentText">Move the slider</p><img id="assessmentImage" width=50 src='https://www.maxpixel.net/static/photo/1x/Questions-Puzzle-Cartoon-Consider-Smiley-3082809.png'> <script>const temperatureFever = 99.5 ; // maximumconst temperatureHypothermia = 95 ; // minimumconst imageFever='https://cdn.pixabay.com/photo/2018/12/24/17/07/catch-a-cold-3893262_960_720.png';const imageHypothermia='https://cdn.pixabay.com/photo/2018/12/19/20/23/samuel-3884706_960_720.png';const imageNormal='https://cdn.pixabay.com/photo/2019/02/19/19/45/thumbs-up-4007573_960_720.png'; function changeTemp() { // Automatically happens when the slider // Algorithm step 1: get the temperature// Implementation: get it from the range finder:var userResponse=document.getElementById("temperature").value;var assessmentText='?';var assessmentImage='';// Algorithm step 2: assess// Implementation: not much different than beforeif ( false ) {assessmentText=" Hypothermia";assessmentImage=imageHypothermia;}else if (false) {assessmentText=" Fever";assessmentImage=imageFever;}else {assessmentText=" Normal";assessmentImage=imageNormal;}// Algorithm step 3: display user-friendly output// Implementation: using variables makes this code work every timedocument.getElementById('assessmentText').innerHTML=userResponse+'° '+assessmentText;document.getElementById('assessmentImage').src=assessmentImage;}</script></body></html>

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Algorithm

We already have an algorithm for Patient Temperature. It will not change.

The Algorithm for Patient Temperature:

  1. get the temperature
    • implementation: with a prompt box before, now it will come from a widget
  2. assess it with conditionals and variables
    • implementation: pretty much the same as before
  3. output a user-friendly message
    • implementation: with an alert box or text before, now some text and images

Your Mission

For each of the two if-statements:   

  1. replace false  with the correct conditional expressions for this program to make sense.
  2. change each of the three images by finding new urls.

<!DOCTYPE html><html><body>

90°<input type="range" min="90" max="110" id="temperature" step=.1 oninput="changeTemp()">110°
<p id="assessmentText">Move the slider</p>
<img id="assessmentImage" width=50 src='https://www.maxpixel.net/static/photo/1x/Questions-Puzzle-Cartoon-Consider-Smiley-3082809.png'>


<script>
const temperatureFever = 99.5 ; // maximum
const temperatureHypothermia = 95 ; // minimum
const imageFever='https://cdn.pixabay.com/photo/2018/12/24/17/07/catch-a-cold-3893262_960_720.png';
const imageHypothermia='https://cdn.pixabay.com/photo/2018/12/19/20/23/samuel-3884706_960_720.png';
const imageNormal='https://cdn.pixabay.com/photo/2019/02/19/19/45/thumbs-up-4007573_960_720.png';

function changeTemp() { // Automatically happens when the slider
// Algorithm step 1: get the temperature
// Implementation: get it from the range finder:
var userResponse=document.getElementById("temperature").value;
var assessmentText='?';
var assessmentImage='';

// Algorithm step 2: assess
// Implementation: not much different than before
if ( false ) {
assessmentText=" Hypothermia";
assessmentImage=imageHypothermia;
}
else if (false) {
assessmentText=" Fever";
assessmentImage=imageFever;
}
else {
assessmentText=" Normal";
assessmentImage=imageNormal;
}
// Algorithm step 3: display user-friendly output
// Implementation: using variables makes this code work every time
document.getElementById('assessmentText').innerHTML=userResponse+'° '+assessmentText;
document.getElementById('assessmentImage').src=assessmentImage;
}
</script></body></html>

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education