Question: Prime Ranks) Write a python function named prime_rank and save it in a python fle named prime rank^y that takes an integers as the argument

 Prime Ranks) Write a python function named prime_rank and save it

Prime Ranks) Write a python function named prime_rank and save it in a python fle named prime rank^y that takes an integers as the argument and returns a dictionary contains the numbers from 1 to n as keys and the first n prime numbers as values. On the main function, please pick a random number between 1 to n and print its prime number with accessing the dictionary. For instance the dictionary for n - 4 is this: prime_nums- 11:2, 2:3, 3:5, 4:7, $ python prime_rank.py The random number is: 126 The 126th prime number is: 701 1000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!