Write a program that prints the numbers from 1 to 50. For numbers that are prime, output “Prime” instead of the number.

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

Write a program that prints the numbers from 1 to 50. For numbers that are prime, output “Prime” instead of the number.

Post by answerhappygod »

Write a program that prints the numbers from 1 to 50. Fornumbers that are prime, output “Prime” instead of thenumber. Note: "Prime numbers are numbersgreater than 1. They only have two factors, 1 and thenumber itself. This means these numbers cannot be divided by anynumber other than 1 and the number itself without leaving anyremainder. "
In Python Please
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply