After receiving the input from user between 1 and 10000, write a code which will display all mersenne prime numbers whic

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

After receiving the input from user between 1 and 10000, write a code which will display all mersenne prime numbers whic

Post by answerhappygod »

After receiving the input from user between 1 and 10000, write a
code which will display all mersenne prime numbers which will
appear like:
Mersenne prime is= 2^prime number -1.
Use only for, while loop functions in writing the code (it is
the elimentary Python curse)
Plase insert the number: 35
Meresenne number 1: 3
Mersenne number 2: 7
Mersenne number 3: 31
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply