Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

just need 5.24. 5.23 is for reference. 5.23 LAB: Output number of integers below a user defined amount k Instructor note: This lab has some

image text in transcribed
just need 5.24. 5.23 is for reference.
image text in transcribed
5.23 LAB: Output number of integers below a user defined amount k Instructor note: This lab has some concepts from TODO 4 of the for-loop Continued video on Canvas Write a program that will output how many numbers are below a certain threshold (a number that acts as a 'cutor or a filter) such functionality is common on sites live Amazon, where a user can Siter results It first prompts for an integer representing the threshold Thereafter, prompts for a number indicating the total number of integers that follow Lastly, it reads that many integers from input the program outputs total number of integers ss than or equal to the threshold If the inputs 100 5 50 CD 149 200 15 the output The 100 (first line indicates that the program should find all integers less than equal to 100. The second line) indicates the total number of integers that focow. The remaining ines contains the 5 integers The output of 3 indicates that there are the internamely 50, 60 and 75 that roles than or equal to the threshold 100 LAR ACTIVITY 5231 LAB Output number of integers belowa uterined amount 07 10 main py 1 lat) 2 - 5.24 LAB: Extend previous lab Extend the program written in the previous lab to output the average of numbers that less than or equal to the threshold. If there are no such numbers, then output an error message Ex If the input is 100 5 50 60 140 200 75 the output is 3 61.667 Note, in addition to the the output of 3 that indicated that there are three integers, namely 50,60, and 75 that are less than or equal to the threshold 100, the average of these integers is also shown up to 3 decimals Ex If the input is 10 5 50 60 140 200 75 the output is O ELEON there are no numbers loos than the provided threshold 3003166 LAR ACTIVITY 524 1 LAB Extend previous lab OY 10

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

Step: 3

blur-text-image

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions