Question: in python, please help Exercise 2 This exercise is about temperature measurements over a period of days. a) Start by creating a simple code that

in python, please help
in python, please help Exercise 2 This exercise is about temperature measurements

Exercise 2 This exercise is about temperature measurements over a period of days. a) Start by creating a simple code that asks for a number of days to run the experiment then asks the user to enter the temperatures for the different days. Use a while loop for this exercise. See sample run below: Enter the number of days of the experiment: 3 Enter a temperature: 42 Enter a temperature: 15 Enter a temperature: 25 End of the experiment. b) Modify the program so that it displays the day index (day 1 , day 2 ) in the question. See below sample run: Enter the number of days of the experiment: 3 Enter the temperature of day 1:42 Enter the temperature of day 2:15 Enter the temperature of day 3:25 End of the experiment. c) Add input validation by checking that the temperature entered is actually a floating point number and does not contain other characters. In case there is an error an alert message should be displayed and the measurement entered again. See below sample run: Enter the number of days of the experiment: 3 Enter the temperature of day 1:42.5 Enter the temperature of day 2 : 12.1 Enter the temperature of day 3 : ten Be careful, you entered an incorrect value for the temperature. Enter the temperature of day 3 : 10 End of the experiment

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!