subject
Computers and Technology, 25.11.2021 06:00 terry94

Overview Practice using loops, lists, and user-defined functions.
Objectives
Use critical thinking skills to determine how to manipulate lists with a user-defined function and loops. You will be able to practice creating functions, returning values, and using lists with loops.
Description
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, read in those integers. Finally, get the last value from the input, and output all integers less than or equal to that value.
Ex: If the input is:
Enter the number of integers in your list: 5
Enter the 5 Integers:
50
60
140
200
75
Enter the threshold value:
100
the output is
The integers that are less than or equal to 100 are:
50
60
75
The integers that are less than or equal to 100 are:
50
60
75
The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75
Such functionality is common on sites like Amazon, where a user can filter results.
Your code must define and call the following function:
def output_ints_less_than_or_equal_to_t hreshold(user_values_list, upper_threshold) returns a list of integers from user_values_list that are less than or equal to upper_threshold
Recall that functions may return a value. In the code you created for previous assignments and examples, you retumad one number that was either an integer or a font. You can actually return anything from a function in the same manner. For this lab, you will be returning a list of integers from your user-defined function.
Likewise, you can pass anything to a function, not just numbers and strings. For this lab, you will have to pass a list to your function.
LAB 100 Output values in a list below a user defined amount functions
1 # Define your function here
2
3 if --nane-- '-noin-' :
4
5 #Start the rest of your code here
6

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
in 2007, floridians died in alcohol-related collisions.a.  501b.  1,051c.  5,015d.  10,839
Answers: 1
question
Computers and Technology, 23.06.2019 07:50
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Alison is having a hard time at work because hee inbox is flooded with emails every day. some of these emails are unsolicited. some of other she don’t need. which action should she take to better manager her emails?
Answers: 1
You know the right answer?
Overview Practice using loops, lists, and user-defined functions.
Objectives
Use cri...
Questions
Questions on the website: 13722363