This assignment is about temperatures and requires the main function and a custom value-returning function. The value-returning function takes a list of random Fahrenheit temperatures as its only argument and returns a smaller list of temperatures that are below freezing. The main function needs these steps in this sequence: • create an empty list that will the hold Fahrenheit temperatures. • use a loop to add 25 random integer temperatures to the list. All temperatures should be between 5 and 75, inclusive. • use another loop to display all 25 temperatures on one line separated by spaces. • report the highest and lowest temperatures in the list. • 32 might be in the list. Report the index of the fırst instance of 32 or report that it didn't make the list. • using slice syntax: o print the first 10 temperatures in the list. o print the middle 5 temperatures in the list. o print the final 10 temperatures in the list. • execute the custom value-returning function with the complete list as its only argument. • report the number of elements in the list that was returned. • sort the list of below freezing temperatures in high to low order • use a loop to display all below freezing temperatures on one line separated by spaces. Sample Output 31 49 19 38 25 9 40 40 49 35 23 44 43 32 62 44 42 55 20 38 35 25 74 16 15 Highest temperature is 74 and lowest is 9 Found 32F at index 13 First 10 in the list [31, 49, 19, 38, 25, 9, 40, 40, 49, 35] Middle 5 in the list [23, 44, 43, 32, 62] Final 10 in the list [44, 42, 55, 20, 38, 35, 25, 74, 16, 15] Found 9 below freezing temperatures Here are the below freezing temperatures... 31 25 25 23 20 19 16 15 9

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Using Python
**This assignment is about temperatures and requires the main function and a custom value-returning function.** The value-returning function takes a list of random Fahrenheit temperatures as its only argument and returns a smaller list of temperatures that are below freezing. The main function needs **these steps in this sequence**:

- Create an empty list that will hold Fahrenheit temperatures.
- Use a loop to add **25 random integer** temperatures to the list. All temperatures should be **between 5 and 75, inclusive**.
- Use another loop to display all 25 temperatures on **one line separated by spaces**.
- Report the **highest and lowest** temperatures in the list.
- 32 might be in the list. Report the **index** of the first instance of 32 or report that it didn't make the list.
- Using **slice syntax**:
  - Print the **first 10** temperatures in the list.
  - Print the **middle 5** temperatures in the list.
  - Print the **final 10** temperatures in the list.
- Execute the custom value-returning function with the complete list as its only argument.
- Report the **number of elements** in the list that was returned.
- **Sort** the list of below freezing temperatures in **high to low** order.
- Use a loop to display all below freezing temperatures on **one line separated by spaces**.

---

**Sample Output**

`31 49 19 38 25 9 40 40 49 35 23 44 43 32 62 44 42 55 20 38 35 25 74 16 15`

Highest temperature is 74 and lowest is 9

Found 32F at index 13

First 10 in the list `[31, 49, 19, 38, 25, 9, 40, 40, 49, 35]`

Middle 5 in the list `[23, 44, 43, 32, 62]`

Final 10 in the list `[44, 42, 55, 20, 38, 35, 25, 74, 16, 15]`

Found 9 below freezing temperatures

Here are the below freezing temperatures...

`31 25 25 23 20 19 16 15 9`
Transcribed Image Text:**This assignment is about temperatures and requires the main function and a custom value-returning function.** The value-returning function takes a list of random Fahrenheit temperatures as its only argument and returns a smaller list of temperatures that are below freezing. The main function needs **these steps in this sequence**: - Create an empty list that will hold Fahrenheit temperatures. - Use a loop to add **25 random integer** temperatures to the list. All temperatures should be **between 5 and 75, inclusive**. - Use another loop to display all 25 temperatures on **one line separated by spaces**. - Report the **highest and lowest** temperatures in the list. - 32 might be in the list. Report the **index** of the first instance of 32 or report that it didn't make the list. - Using **slice syntax**: - Print the **first 10** temperatures in the list. - Print the **middle 5** temperatures in the list. - Print the **final 10** temperatures in the list. - Execute the custom value-returning function with the complete list as its only argument. - Report the **number of elements** in the list that was returned. - **Sort** the list of below freezing temperatures in **high to low** order. - Use a loop to display all below freezing temperatures on **one line separated by spaces**. --- **Sample Output** `31 49 19 38 25 9 40 40 49 35 23 44 43 32 62 44 42 55 20 38 35 25 74 16 15` Highest temperature is 74 and lowest is 9 Found 32F at index 13 First 10 in the list `[31, 49, 19, 38, 25, 9, 40, 40, 49, 35]` Middle 5 in the list `[23, 44, 43, 32, 62]` Final 10 in the list `[44, 42, 55, 20, 38, 35, 25, 74, 16, 15]` Found 9 below freezing temperatures Here are the below freezing temperatures... `31 25 25 23 20 19 16 15 9`
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY