Welcome to Westonci.ca, the place where your questions are answered by a community of knowledgeable contributors. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.

Hello,
It is difficult for me to trouble everyone, but I need a lot of help and I am doing this practically on my own. This is only my second week and a half in a python or OOP course. I've tried to type this in python, but I need help, can someone please support me? I am trying to understand how to type my codes in the proper format for the correct output. Thanks truly. Here is the question and the input:
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, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value.
Ex: If the input is:
5
50
60
140
200
75
100
the output is: (Must print horizontally)
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.
For coding simplicity, follow every output value by a comma, including the last one.
Here is the code I have been inputting, but it doesn’t print the numbers 50, 60, 75, horizontally in python/python3:
num = int(input())
#create an empty list to store the values
num_list = [ ]
#loop to take the input values from user
for i in range(5):
num_list.append(int(input())
# print less than or equal to
for num in num_list
if num <= check:
print(str(num)+",",end=" ")

I wish I could hug whoever helps and say thanks. I'd greatly appreciate anyone's support truly.

Warm regards,
Lily