Answer:
take user input element of list and print element of list whose value are less than equal to last value of list
<u>Image 1: Input</u>
def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold):
print("The integers that are less than or equal to", upper_threshold, "are:")
for value in user_values:
if value < upper_threshold:
print(value)
def get_user_values():
n = int(input("Enter the number of integers in your list: ");
1st = []
print("Enter the", n, "integers:");
for i in range(n):
1st.append(int(input)
return ist
if _name__ == '_main_':
userValues = get_user_values();
upperThreshold = int(userValues[-11), output ints less than or equal to threshold(userValues, upperThreshold)
<u>Image 1: Output</u>
Enter the number of integers in your list: 3 Enter the 3 integers:
10
50
20
The integers that are less than or equal to 20 are:
10