Question: Question 1 (10 points) Is Prime Function Write a well-documented Python program, hmwk4Q1.py, that defines a function isPrime.py(N). The function accepts an integer N and

Question 1 (10 points) Is Prime Function Write a well-documented Python program, hmwk4Q1.py, that defines a function isPrime.py(N). The function accepts an integer N and returns True if N is a prime number, otherwise, returns False. Next, define the main function that asks the user for a range of numbers, say from 2 to M, and counts how many prime numbers there are within the range. Hints: Adapt your solution from Homework 2. Grading: Correct isPrime.py(N) function (+4 points). Correct main() function (+4 points). Include _name_ is set to '_main_' to ensure the program initiates when it is run (+2 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
