Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use python Use python ? Quick Sort: Quick Sort is a well-know sorting algorithm. It uses a divide and conquer methodology. Create a python program
Use python
Use python ?
Quick Sort: Quick Sort is a well-know sorting algorithm. It uses a divide and conquer methodology. Create a python program that will sort a bunch of words read from a file in to alphabetical order. The second video showed you the code for numbers. There are two changes that you will need to make/add: (1) reading the data from a file and (2) getting the data into alphabetical order The File: Example Run of Program: The data will be read from a file called input.txt. Each word will be on a separate line. For example: bison fox zebra Bear armadillo Sample Output: Armadillo Bear Bison Fox Hare Penguin Yak Zebra Penguin Hints: 1. Get the quick sort running first (i.e., try a list of numbers) 2. newList - list(variableAsString) might be helpful depending on how you code this... Note: or" variableAsString is something of type string (i.e., a word inside list version of this string) and newList is the 3. ".join(aVariablelnListFormat) might be helpful depending on how you code this... Note: aVariablelnListFormat allows you convert from a List back into a StringStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started