Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. Primes [2 marks] A prim e p > 1 has no factors other than 1, so p%m 0 for all

ID: 3753060 • Letter: 2

Question

2. Primes [2 marks] A prim e p > 1 has no factors other than 1, so p%m 0 for all m {2.3, p-1). Test all the integers greater than 1 that you can, and identify the primes (again, write your own code). How far can you get in 10 minutes (use a clock or watch to approximately time this)? Print (or write) the last three primes that you find, and also check them using a web tool (Google "prime checker"). Advanced (no extra marks): you only need to check up to P, and you only need to check the primes you have already found up to vp

Explanation / Answer

Output:

Last three prime numbers till ten minutes are :
1074253
1074251
1074223

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote