Question: This is a Python programming question. Could you please show me what is wrong with my code. I want to generate a list of 20

This is a Python programming question.

Could you please show me what is wrong with my code. I want to generate a list of 20 numbers from 1 to 20. Please do not completely rewrite the code, just show me how my code can be fixed.

random_list = []

for num in range(20):

mystery_number = random.random()

mystery_number = math.ceil((mystery_number * 20))

random_list = random_list.append(mystery_number)

print(random_list)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!