Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CODE IN PYTHON 1. Before starting, consider how to design the while loop. Hint: This program needs to record the human body temperature of a

image text in transcribed

CODE IN PYTHON

1. Before starting, consider how to design the while loop. Hint: This program needs to record the human body temperature of a person for the last four days (four times). Think about a counter variable which will increment till the value is 4 to accept temperature from the user. a. What would be the loop condition? b. What would be the stopping criteria? c. How to modify the loop variable? 2. Your program needs to store the body temperature of a person apart from basic information as mentioned in the problem description. Determine what will be the most suitable sequence to store the temperatures of a person, how to calculate the average from the sequence, and where to initialize the sequence? a. Hint: Define a valid sequence which will store the body temperature of one person, use built-in methods to calculate the average. Hint: sum() is a built-in method that returns summation of numbers in a sequence. You may need it to calculate the average body temperature. average = sum of values/ total number of values 3. Once the average temperature is calculated, the program will determine the label as shown below. Hint: a conditional structure will help in this case. 4. A sample 1/O is provided to see how the program works. You need to use the string.format() function to properly display the information. Please note sample 1/O is provided to clarify what to be expected from the program. You may change the text/interface but the program needs to display the information as shown. 5. Test the application by hand-calculating several values and use the same values to validate the operation. Sample input/output: Enter the person's name: Mary Elizabeth Smith Enter your age: 68 Enter your gender: Female Enter the body temperature of the person on day-1 in F:99.8 Enter the body temperature of the person on day-2 in F:102.0 Enter the body temperature of the person on day-3 in F:103.4 Enter the body temperature of the person on day-4 in F:101.5 Name: Mary Elizabeth Smith Age: 68 Gender: Female Average body temperature is 101.68 in F class/Label: Fever/Hyperthermia

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

Prepare and properly label figures and tables for written reports.

Answered: 1 week ago