Help fix this code to use list comprehension to generate 50 random marks import random randmarks=[RandInt(100) for i in range(50)] | Sololearn: Learn to code for FREE!
0

Help fix this code to use list comprehension to generate 50 random marks import random randmarks=[RandInt(100) for i in range(50)]

This is code to generate random numbers in list

24th Mar 2017, 1:34 PM
SAMI Awad
SAMI Awad - avatar
1 Answer
0
I fixed it. Multiple errors above. Find the corrected code below import random randmarks=[random.randint(0,100)for i in range(50)] for i in range(50): print(i,randmarks[i])
24th Mar 2017, 1:45 PM
SAMI Awad
SAMI Awad - avatar