List Assignment, Python Programming

Assignment Help:
Task
This problem creates a list containing names. The list of names will be printed, sorted, printed again in the new sorted order, written to a new output file, and searched. Carefully read chapter 8 to find examples of the techniques and functions you need to solve this problem. You must design your solution using these 4 sub-functions:

1) Input the names from the data file names.txt (which is located in the Homework 8 folder in D2L) into a list and return the list to main.
2) Print the names one per line and single-spaced. Call this function (twice) passing the list of names to it for printing before and after they are sorted (do the sorting in main).
3) Pass the sorted list of names to a function which writes the list to a new output file (use a name different than the input file’s name) with one name per line.
4) Pass the sorted list of names to a function which asks the user to enter a name and then indicate whether the name entered is found in the list or not. If the name is found in the list, its position (i.e. index) is also printed.

The data file for this program contains 30 names each with the format Last, First. This value is to be processed as one, not separately. The user enters the search name in this same format as one string (i.e. not separately as Last and First names) unless your program is coded to concatenate them appropriately. Use Notepad to look at (and print) the test data file names.txt.

When testing your program, use the last and first names in the list along with one in the middle. Also test for one not in the list. Open the new output file with Notepad to verify that it contains the sorted list of names, one per line.

For 5 extra credit points, create a loop so the user can enter additional names to be searched for without having to rerun the entire program (show this loop in the logic diagram and include it in your program).

Submit each of the following in electronic format following class standards inside a compressed folder using the D2L drop boxes for Homework 8.

Use the logic diagrams drop box to submit:
1. A hierarchy chart drawn with MS-Visio. (2 points)
2. Program flowcharts drawn with MS-Visio showing your logical solution. (9 points)

Use the program drop box to submit:
3. A Python program implementing the solution shown in your logic diagrams. (14 points)

Related Discussions:- List Assignment

Algorithms, how to calculate area of a square in square metres

how to calculate area of a square in square metres

Primitives, Primitives, Composition, Abstraction, and Patterns   We ...

Primitives, Composition, Abstraction, and Patterns   We will  start  by thinking about  how  the  PCAP  framework applies to computer programs, in general. We may do that by

Cps translator for python, Your task is to construct a translator from the ...

Your task is to construct a translator from the subset of Python in Project 3 intocontinuation-passing style (CPS). Of course, the expected way of accomplishing this is to trans

File handling , A program to count how many files are on the file system wh...

A program to count how many files are on the file system which displays summary information regarding the total number of bytes used by all files and a breakdown of the number of b

Van der waals equation of state, how to make a python programme for van der...

how to make a python programme for van der waals equation of state with surface discontinouty

Interaction and debugging, We encourage you to adopt an interactive style o...

We encourage you to adopt an interactive style of debugging and programming. Use the Python shell a lot. Write short pieces of code and check them.  It is much  simpler to test the

Random Geometric Graphs, Displaying random geometric graphs in an uniform s...

Displaying random geometric graphs in an uniform square, unit disk, dense rim unit disk, and uniform sphere

Conditionals- booleans, Booleans   Before we talk about  conditional...

Booleans   Before we talk about  conditionals, we require  to clarify the Boolean  data  type.  It has two values False and True. Typical statement that have Boolean values

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd