Design an algorithm

Assignment Help Computer Engineering
Reference no: EM131229546

Task -

In the Resources section of the Interact2 subject website there is a data file called students.txt. This file contains student details: a valid student number, course (BIT or MIT) and the specialisation (ex: software design and development). Each student number is an eight digit number such as 11556677. (Note: Two records in the file have intentionally been "corrupted" - for testing purposes.)

Design an algorithm and use it to write a Python program that allow the user to reads the contents of the data file into a list. The program should then loop, to allow a user to check various numbers against those stored in the list. The loop should terminate when an "empty" input occurs - i.e. when the user presses the [Enter] key on its own. (Obviously this last entry should NOT be checked against the list!) If the student number input matches an element somewhere in the list, the program should display the number together with the course and the specialisation. If the number input does not match any element in the list, then the program should display the number and a message saying that it IS NOT a valid student number.

Notes:

The algorithm should be written in pseudocode (structured English).

The records read from the data file should be checked and NOT placed into the list if they are something other than an 8 digits. (Display a sensible message if the file is found to have corrupt records in it.)

The numbers entered by the user should be checked to ensure they are valid digits (as distinct from valid student numbers) and not processed further if they are not.

Your programs should use one or more functions where sensible, and be documented fully.

Use exceptions where necessary.

Specify 3 sets of test data that will demonstrate the correct 'normal' operation of your program. Show your test data in a table as you have done in earlier assignments.

Run your program using the test data you have selected and save the output produced in a single text file.

Submit:

1. Your algorithm and test data table.

2. The table recording your chosen test data.

3. Source code for your Python implementation.

4. Output test file demonstrating the results of using the test data.

5. Contents of the data file cars.txt read by the program.

It is important that the output listings are not edited in any way.

Rationale

Reinforce topic material related to files and exceptions.

Reinforce topic material related to lists.

Reference no: EM131229546

Questions Cloud

Draw a control block diagram of the cascaded system : Draw a control block diagram of the cascaded system - Describe the response of the cascaded system to a change in the measured level of liquid.
How does the impact you in being a role model for others : With your role models in mind, and having read the author's definition of "role model," how does this impactyou in being a role model for others?
Potential ethical and conflict of interest issues : What are the potential ethical and conflict of interest issues arising from CEO involvement in the selection of board members? How can these issues be addressed?
Manager of a horizontally structured group : Indicate which tasks below a manager of a horizontally structured group is likely to do more of and which less of compared to a counterpart-manager of a vertically structured group. Briefly write the reasons for your choices.
Design an algorithm : Design an algorithm and use it to write a Python program that allow the user to reads the contents of the data file into a list. The program should then loop, to allow a user to check various numbers against those stored in the list. The loop shou..
Marketing for a service organization : Some service marketers maintain that marketing for a service organization is fundamentally different for marketing for a firm that sells products. Do you think that simply good marketing is good marketing?
Conflict resolution paper assignment : Read the case study for this unit regarding ExtremeNet and Allen Lopez. As the Chief Executive Officer for ExtremeNet, you are responsible for resolving the conflict between Allen Lopez and ExtremeNet in a manner that demonstrates solid ethical re..
What is the purpose of osha safety standards : What is the purpose of OSHA safety standards? Do you think that businesses would take substantial safety precautions without the imposition of such standards?
Explain the possible use of data mining : 1. Explain the possible use of data mining, text mining, and Web mining. 2. Is it possible to use social analytics, social networks, and social network analysis? What are the relationships among them?

Reviews

Write a Review

 

Computer Engineering Questions & Answers

  Questionbased on the confusion matrix belowcluster red

questionbased on the confusion matrix belowcluster red green purple black white blue total1 1 1 0 11 4 676 6932 27 89

  Write a program in c++ to calculate body fat and percentage

Write a program in c++ to calculate the body fat and body fat percentage of a person. It must be able to handle gender, use a char data type. Please note that the user may enter f, F, m, M.

  Logic programming and imperative programming

Can describe procedural language in clearly and simply - And compare other object-oriented programming, functional programming, logic programming and imperative programming.

  You have been recently hired by the fortune 500 company to

you have been recently hired by a fortune 500 company to assist in refining the companys enterprise architecture. one

  Give the advantages and the disadvantages of each method

give the advantages and the disadvantages of each method.

  What are the lowest and highest addresses

What are the lowest and highest addresses if memory is byte-addressable? What are the lowest and highest addresses if memory is word-addressable, assuming a 16-bit word?

  What is the best process to dispose of a cell phone

What is the best way to dispose of the cell phone without leaving your personal information out there for someone else to access? In this disposable society, cell phones are good for about 2 years and you buy a new one. The old one usually ends up..

  Write down or copy or paste the complete problem narrative

Write down or copy/paste the complete problem narrative, including tables. Show your Lindo model. Show your Lindo output. Answer all questions pertaining to the problem.

  Specific exit off the pennsylvania turnpike

The number of passenger cars taking a specific exit off the Pennsylvania Turnpike on Thanksgiving weekend averages 5 per minute. Of those 50% have only the driver; 30% have 2 people in the car

  How to provide the name of the web site

For this project you will need to make a Microsoft Word document which includes a table and hyperlinks to Web sites helpful to someone studying in your major Paralegal.

  As the lead analyst for the hoosier burger project you have

as the lead analyst for the hoosier burger project you have worked closely with bob and thelma nbspmellankamp. having

  Design a combinational logic function

You are required to design a combinational logic function with 4 inputs (P, Q, R, S) and a single output (Z). Whenever the minterm value of the inputs (PQRS) matches one of the digits in your SID the function output will be a don't care. Otherwise..

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