Welcome to Westonci.ca, where your questions are met with accurate answers from a community of experts and enthusiasts. Discover in-depth answers to your questions from a wide network of experts on our user-friendly Q&A platform. Join our platform to connect with experts ready to provide precise answers to your questions in different areas.

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