Write a program to print 5 random numbers divisible by 4 between 100 and 200


Topic: Write a program to print 5 random numbers divisible by 4 between 100 and 200

Solution

import random
print(random.sample([i for i in range(10, 100) if i%4 == 0], 5))



List all Python Programs