Question: Hi I need help with these two problems (they are similar to each other I think). PLEASE USE PYTHON 3 ONLY. Will like. 1) He
Hi I need help with these two problems (they are similar to each other I think). PLEASE USE PYTHON 3 ONLY. Will like.
1) He wants to develop a program calledprime.py. This program asks for a number from user and then it tells if the number is a prime number or not. To implement this program, you can use a method called Sieve of Eratosthenes. Given a numbern, test each number from2ton-1and see if anyone can dividen. You can use a loop to test each of these numbers and use a counter to keep track of the number of factors of n.
2) Number Two has a treasure safe. The key isthe first prime numberthat is greater than 60000. Write a program calledkey.pyto find out the pincode. (Hint: adapt prime.py and make it a nested loop).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
