The task is to generate a list of random numbers within a range n times. I wrote the code and read it many times but cant figure out where it can possibly go wrong
import random
def generate_random_list(c,b,n):
list = []
for i in range(0,n):
t = random.randint(c, b)
list1 = list.append(t)
return list1
heh = generate_random_list(1,100,20)
Aucun commentaire:
Enregistrer un commentaire