Question: IN PHYTHON Deliverable You are required to complete Question 17 and 18 of Chapter 5 programming exercises. 17. Prime Numbers A prime number is a

IN PHYTHON

Deliverable

You are required to complete Question 17 and 18 of Chapter 5 programming exercises.

17. Prime Numbers

A prime number is a number that is only evenly divisible by itself and 1. For example, the number 5 is prime because it can only be evenly divided by 1 and 5. The number 6, however, is not prime because it can be divided evenly by 1, 2, 3, and 6. Write a Boolean function named is_prime which takes an integer as an argument and returns true if the argument is a prime number, or false otherwise. Use the function in a program that prompts the user to enter a number then displays a message indicating whether the number is prime. Tip: Recall that the % operator divides one number by another and returns the remainder of the division. In an expression such as num1 % num2, the % operator will return 0 if num1 is evenly divisible by num2.

18. Prime Number List

This exercise assumes that you have already written the is_prime function in Programming Exercise 17. Write another program that displays all of the prime numbers from 1 to 100. The program should have a loop that calls the is_prime function.

To prepare for this Assignment:

Review Chapters 1-6 of the textbook (Starting out with Python by Tony Gaddis)

Use the development environment set up during this week's discussion.

Use any text editor of your choice to create your code.

Zip up all code/project folder in a Folder named "CS202-Mod1-Your Name

Write and document with a screenshot of each step of the exercise in a Word document.

Submit the zip folder and the Word document.

Use the rubric below to estimate your grade on the Assignment.

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!