Question: Please use Python 3.6 I need the answer for question 16.10 i listed the algorithms below that should be used in 16.10 Write a program

Please use Python 3.6 I need the answer for question 16.10 i listed the algorithms below that should be used in 16.10 Please use Python 3.6 I need the answer for question 16.10

i listed the algorithms below that should be used in 16.10 Write

a program that obtains the execution time for finding all the prime

Write a program that obtains the execution time for finding all the prime numbers less than 8,000,000, 10,000,000, 12,000,000, 14,000,000, 16,000,000, and 18,000,000 using the algorithms in Listings 16.4-16.6. Your program should print a table like this: Write a program that prompts the user to enter two strings and tests whether the second string is a substring in the first string.(Don't use the find method in the str class.) Analyze the time complexityof your algorithm. Here is a sample run of the program: Enter a string S1: Mississippi Enter a string S2: sip matched at index 6 (Same-number subsequence) Write an o(n) program that prompts the user to enter a sequence of integers and finds longest subsequence with the samenumber. Here is a sample run of the program: Enter a series of numbers ending with 0: 2 4 4 8 8 8 8 2 4 4 0 The longest same number sequence starts at index 3 with 4 values of 8 (Execution time for GCD) Write a program that obtains the execution time for finding the GCD of every two consecutive Fibonacci numbers from the index40 to index 45 using the algorithms in Listings 16.2 and 16.3. Yourprogram should print a table like this: import time startTime = time.time () #whatever you want to time, put it here time.sleep (3) # sleep for 3 seconds endTime = time.time() elapsed = endTime - startTime print ("It took", elapsed, "second to run")

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!