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, 21.06.2019 19:30
Entering key dates from your course syllabi test and quiz dates, assignments due dates in your planner can you manage your schedule by allowing you to see commitments ahead of time.
Answers: 3
question
Computers and Technology, 22.06.2019 01:40
Kali, a python programmer, is using the turtle module to write the word β€œhello.” which code should she use to indicate the location to begin writing the word? a # pick up the turtle and move it to its starting location. b penup(-100, 200) goto() pendown() c penup() goto(-100, 200) pendown() d # pick up the turtle and move it to (-100, 200)
Answers: 2
question
Computers and Technology, 22.06.2019 03:30
Identify at least three types of characteristics that you were asked about as you the computer identify a fruit.
Answers: 3
question
Computers and Technology, 23.06.2019 11:00
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
You know the right answer?
Overview Practice using loops, lists, and user-defined functions.
Objectives
Use cri...
Questions
question
Mathematics, 20.12.2019 08:31
question
History, 20.12.2019 08:31