Computer Science
Write a program to generate 3 random integers between 100 and 999 which is divisible by 5.
Python
Python Data Handling
42 Likes
Answer
import random
a = random.randrange(100, 999, 5)
b = random.randrange(100, 999, 5)
c = random.randrange(100, 999, 5)
print("Generated Numbers:", a, b, c)
Output
Generated Numbers: 885 825 355
Answered By
22 Likes
Related Questions
Write a program that generates six random numbers in a sequence created with (start, stop, step). Then print the mean, median and mode of the generated numbers.
Write a program to generate 6 digit random secure OTP between 100000 to 999999.
Write a program to generate 6 random numbers and then print their mean, median and mode.
Write a program whose three sample runs are shown below:
Sample Run 1:
Random number between 0 and 5 (A) : 2
Random number between 0 and 5 (B) :5.
A to the power B = 32Sample Run 2:
Random number between 0 and 5 (A) : 4
Random number between 0 and 5 (B) :3.
A to the power B = 64Sample Run 3:
Random number between 0 and 5 (A) : 1
Random number between 0 and 5 (B) :1.
A to the power B = 1