Search Comparisons: Create a Python program called SearchComparisons.py that asks if a generated list is to be printed. The user enters “y” to print the list, or “n” to not. Anything else will end the program with an “Invalid response” message). The program then asks for the length of the list to be created. An array of randomly generated integers is then created as well as a random integer key. Both are determined by the list length. For example, a list length of 7 will generate 7 random integers and a random key all between 0 and 6. The program does a linear search on the key and reports its position (first occurrence). Then, the program sorts the list in ascending order for a binary search on the key. The binary search captures the number of reads to find the key. All user-defined functions should be completely written by the student without the use of utilities in Python built-in modules. See the sample output, user-defined headers and flowcharts below. When complete, please rename your program to “Your name Lab07A.py” and send it to me as an attachment in a Blackboard message. User-defined function headers are:
linearSearch(listIn, key)
bubbleSort(listIn)
binarySearch(listIn, key)
Sample runs:
Enter 'y' to print the list, 'n' to not print the list: y
Enter list length: 9
Key = 6
Unsorted list: [6, 7, 5, 1, 3, 6, 1, 4, 7]
Key 6 found in linear search at position: 1
Sorted list: [1, 1, 3, 4, 5, 6, 6, 7, 7]
Key 6 found in binary search after 2 reads.
Enter 'y' to print the list, 'n' to not print the list: y
Enter list length: 7
Key = 2
Unsorted list: [0, 0, 5, 3, 1, 4, 1]
No key found in linear search
Sorted list: [0, 0, 1, 1, 3, 4, 5]
No key found in binary search
Enter 'y' to print the list, 'n' to not print the list: n
Enter list length: 1000
Key = 116
No key found in linear search
No key found in binary search
Enter 'y' to print the list, 'n' to not print the list: n
Enter list length: 10000
Key = 7252
Key 7252 found in linear search at position: 7563
Key 7252 found in binary search after 12 reads.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme