Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

just do 1 as 3 is relayed to 1. Question 1 (10 points) Finding the Mth Prime Number Write a well-documented Python program, hmwk3Q1.py that

image text in transcribedjust do 1 as 3 is relayed to 1.
image text in transcribed
Question 1 (10 points) Finding the Mth Prime Number Write a well-documented Python program, hmwk3Q1.py that finds the prime number by extending hmwk2Q3.py, which finds the prime number for a single number. Have your program query the user for the integer M. Print the value of the 908th prime number and record it as a comment in your Python program. Hints: Re-use hmwk2Q3.py software by embedding it in a while-loop. The while-loop continues to call upon the prime number code until it finds the 908th prime number. Make sure that inside the while-loop you implement a counter, which is incremented when a prime number is found. Grading: Comments (2 points).Input software to query for M (+2 points).A correct while-loop (4 points). The correct value for the prime number as a comment (+2 points). Question 3 (10 Points) Prime Number In a well-commented Python program hmwk2Q3.py, extend the solution provided in Question 2 to determine if the integer N is a prime number. Include a screen capture Hmwk2Q3.jpg for the test case below Is The Integer Prime ? Enter an integer: 7919 7919 is Prime Hmwk203.jpg Grading: 2 points for comments, 2 points for a correct logical test to determine if number is prime from the list of the factors (no need to display the list), 4 points for extending code from Hmwk2Q2.py, and 2 points for Hmwk203.jpg. Question 1 (10 points) Finding the Mth Prime Number Write a well-documented Python program, hmwk3Q1.py that finds the prime number by extending hmwk2Q3.py, which finds the prime number for a single number. Have your program query the user for the integer M. Print the value of the 908th prime number and record it as a comment in your Python program. Hints: Re-use hmwk2Q3.py software by embedding it in a while-loop. The while-loop continues to call upon the prime number code until it finds the 908th prime number. Make sure that inside the while-loop you implement a counter, which is incremented when a prime number is found. Grading: Comments (2 points).Input software to query for M (+2 points).A correct while-loop (4 points). The correct value for the prime number as a comment (+2 points). Question 3 (10 Points) Prime Number In a well-commented Python program hmwk2Q3.py, extend the solution provided in Question 2 to determine if the integer N is a prime number. Include a screen capture Hmwk2Q3.jpg for the test case below Is The Integer Prime ? Enter an integer: 7919 7919 is Prime Hmwk203.jpg Grading: 2 points for comments, 2 points for a correct logical test to determine if number is prime from the list of the factors (no need to display the list), 4 points for extending code from Hmwk2Q2.py, and 2 points for Hmwk203.jpg

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions

Question

1. Describe qualitative research and its assumptions.

Answered: 1 week ago

Question

Enhance the basic quality of your voice.

Answered: 1 week ago

Question

Describe the features of and process used by a writing team.

Answered: 1 week ago