Q. Write a program to generate 3 random integers between 100 and 999 which is divisible by 5.

 

Answer = 

 

import random
count = 1
while count <= 3 :
    num = random.randint(100,999)
    if num % 5 == 0 :
        print (num)
        count += 1



Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post