Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify the function PF (N) with comments so: Any new primes that are found are appended to the list primes [] No prime factor

 

Modify the function PF (N) with comments so: Any new primes that are found are appended to the list primes [] No prime factor p > VN is tested. (b) Modify the for N loop: test all N up to 100 but only print N and factors when it has exactly 3 unique prime factors. Unique means each of the prime factors occurs once. 30=235 has 3 unique prime factors but 18-233 and 60=2235 do not. at the end of the loop print the count with 3 unique prime factors, and the count and actual primes < 100. The output should look like that shown below: 1: 30 [2, 3, 5] 2: 42 [2, 3, 7] 3: 66 [2, 3, 11] 4: 70 [2, 5, 7] 5: 78 [2, 3, 13] 5 numbers

Step by Step Solution

3.43 Rating (159 Votes )

There are 3 Steps involved in it

Step: 1

I can help you modify the PF function and the for loop as per your requirements with comments explai... 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_2

Step: 3

blur-text-image_3

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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions