Answer:
Follows are the code to this question:
import random as ra#import package
r=[ra.randint(0, 200) for x in range(100)]#defining a variable r that use rand method to add value in list
j= [i for i in r if i < 99]#defining j variable that checks list value is less than 99
print (j)#print list value
Output:
[20, 23, 66, 47, 89, 7, 18, 13, 92, 31, 23, 60, 3, 52, 18, 20, 85, 64, 55, 98, 14, 80, 80, 14, 57, 92, 76, 14, 91, 83, 87, 80, 16, 50, 7, 88, 19, 4, 72, 23, 27, 79, 23]
Explanation:
In this code, package random is imported, in the next step, the r variable is declared, that uses the randit method, and use for loop that adds value in the list. In the next step, the j variable is declared, which uses a for loop and a conditional statement to check its value is less than 99, add print its value.