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>

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter12: Using Controls
Section: Chapter Questions
Problem 12E
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
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT