Write a Python program that creates a menu-driven SORTING ALGORITHM application. You should implement this program using functions. This application is menu-driven by asking the user to choose an option to sort a key-in values (integer or letters). It should also displays the PASS result per iteration and produces the final SORTED LIST output at the end of the program execution. See details of the MENU-DRIVEN SORTING ALGORITHM APP. Your program should validate all data to be process and displays an appropriate error message. Assume that option It should display: ******** SORTING ALGORITHM APPLICATION ****** 7 5 2 4 10 1 6 3 Programmed by: <<<< M A IN MENU > > > (1) SELECTION SORTING (2) BUBBLE SORTING (3) INSERTION SORTING (4) MERGE SORTING Select an option: 1 was selected: How many elements are there on your list? Enter type of elements? [1] INTEGERS [2] LETTERS (Upper-case only) => Enter sorting mode: [1] ASCENDING [2] DECENDING [3] APHABETICALLY => How many elements are there on our lists? 8 Enter type of elements? [1] INTEGERS [2] LETTERS (Upper-case only) => 1 Enter the sorting mode: [1] ASCENDING [2]DESCENDING [3] ALPHABETICALLY => 2 Enter your 8 INTEGERS now (END EACH INTEGER BY AND ENTER KEY) => PASS 1: 7, 5, 4, 10, 2, 6, 3, 1 PASS 2: 7, 5, 10, 4, 6, 3, 2, 1 PASS 3: 7, 10, 5, 6, 4, 3, 2, 1 PASS 4: 10, 7, 6, 5, 4, 3, 2, 1 PASS 5: 10, 7, 6, 5, 4, 3, 2, 1 FINAL SORTED ELEMENTS => 10, 7, 6, 5, 4, 3, 2, 1 Do you want to try again? [y/n] => if yes, the program redisplay the main menu. Otherwise, program exits. ****END****

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Write a Python program that creates a menu-driven SORTING ALGORITHM application. You
should implement this program using functions. This application is menu-driven by asking the
user to choose an option to sort a key-in values (integer or letters). It should also displays the
PASS result per iteration and produces the final SORTED LIST output at the end of the program
execution. See details of the MENU-DRIVEN SORTING ALGORITHM APP. Your program should
validate all data to be process and displays an appropriate error message.
Assume that option
It should display:
******** SORTING ALGORITHM APPLICATION ******
7
5
2
4
10
1
6
3
Programmed by: <name>
<Course> <Year> <Section>
<<< M A IN
MENU>>>
(1) SELECTION SORTING
(2) BUBBLE SORTING
(3) INSERTION SORTING
(4) MERGE SORTING
Select an option:
1 was selected:
How many elements are there on your list?
Enter type of elements? [1] INTEGERS [2] LETTERS (Upper-case only) =>
Enter sorting mode: [1] ASCENDING [2] DECENDING [3] APHABETICALLY =>
How many elements are there on our lists? 8
Enter type of elements? [1] INTEGERS [2] LETTERS (Upper-case only) => 1
Enter the sorting mode: [1] ASCENDING [2]DESCENDING [3] ALPHABETICALLY => 2
Enter your 8 INTEGERS now (END EACH INTEGER BY AND ENTER KEY) =>
PASS 1: 7, 5, 4, 10, 2, 6, 3, 1
PASS 2: 7, 5, 10, 4, 6, 3, 2, 1
PASS 3: 7, 10, 5, 6, 4, 3, 2, 1
PASS 4: 10, 7, 6, 5, 4, 3, 2, 1
PASS 5: 10, 7, 6, 5, 4, 3, 2, 1
FINAL SORTED ELEMENTS => 10, 7, 6, 5, 4, 3, 2, 1
Do you want to try again? [y/n] => if yes, the program redisplay the main menu. Otherwise, program
exits.
****END****
Transcribed Image Text:Write a Python program that creates a menu-driven SORTING ALGORITHM application. You should implement this program using functions. This application is menu-driven by asking the user to choose an option to sort a key-in values (integer or letters). It should also displays the PASS result per iteration and produces the final SORTED LIST output at the end of the program execution. See details of the MENU-DRIVEN SORTING ALGORITHM APP. Your program should validate all data to be process and displays an appropriate error message. Assume that option It should display: ******** SORTING ALGORITHM APPLICATION ****** 7 5 2 4 10 1 6 3 Programmed by: <name> <Course> <Year> <Section> <<< M A IN MENU>>> (1) SELECTION SORTING (2) BUBBLE SORTING (3) INSERTION SORTING (4) MERGE SORTING Select an option: 1 was selected: How many elements are there on your list? Enter type of elements? [1] INTEGERS [2] LETTERS (Upper-case only) => Enter sorting mode: [1] ASCENDING [2] DECENDING [3] APHABETICALLY => How many elements are there on our lists? 8 Enter type of elements? [1] INTEGERS [2] LETTERS (Upper-case only) => 1 Enter the sorting mode: [1] ASCENDING [2]DESCENDING [3] ALPHABETICALLY => 2 Enter your 8 INTEGERS now (END EACH INTEGER BY AND ENTER KEY) => PASS 1: 7, 5, 4, 10, 2, 6, 3, 1 PASS 2: 7, 5, 10, 4, 6, 3, 2, 1 PASS 3: 7, 10, 5, 6, 4, 3, 2, 1 PASS 4: 10, 7, 6, 5, 4, 3, 2, 1 PASS 5: 10, 7, 6, 5, 4, 3, 2, 1 FINAL SORTED ELEMENTS => 10, 7, 6, 5, 4, 3, 2, 1 Do you want to try again? [y/n] => if yes, the program redisplay the main menu. Otherwise, program exits. ****END****
Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Lists
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education