Question: Write a Python program that generates a sequence/list of unique prime numbers (a prime number is only evenly divisible by itself and 1, for example,

Write a Python program  that generates a sequence/list of unique prime numbers (a prime number is only evenly divisible by itself and 1, for example, 5, 7,11, 13 are prime numbers). Specifically, the program must meet the following detailed requirements:
2. Define a function, generate_random_number(n1, n2), which return a prime number that is between n1 and n2 inclusive. (Hint: use random.randint(n1, n2) to generate a random number).

Step by Step Solution

3.50 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

er for cc g share ng ions Contact Us GDB acy C mainpy 1 import random 34523 4 6 16 17 ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!