Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is a python work. NOTE: You may not use any functions from external modules loaded by 'import.' In addition, you may not use dictionaries,

image text in transcribed

this is a python work. NOTE: You may not use any functions from external modules loaded by 'import.' In addition, you may not use dictionaries, list comprehensions,

thanks for helping!

2. Write function q2(num) that takes a positive integer as input and returns a list of that number's prime divisors. You may copy and use the numlsPrime function developed in class if you wish Note: First, implement a correct algorithm for this problem, testing it on not-very-large numbers. Next, test it on 5003 *5003+1 or similarly large numbers. If it takes a long long time on such numbers, consider whether you can re-organize your algorithm to make it faster. For this assignment, we won't deduct for inefficiency, but it's a good thing to think about Examples: 2(36) 2,31 q2(23) 123, 9212 q2(5003 5003+1) 2, 5, 2503001 121 11 9211 2(4)

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 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

More Books

Students also viewed these Databases questions