Implement your algorithm in python

Assignment Help Other Subject
Reference no: EM132739365

Assessment item - File Processing

TASK

In this assignment you will use turtle graphics to create a drawing from data stored in files. You can reuse the easyshape module developed in the previous assignment. However, in this assignment, the drawing commands will be read from a file specified by the user, rather than user input.

Drawings will be stored in a text format in which each line represents one command. For example, the following file:

S,black,2 L,50,0,250,0 A,50,90 L,300,150 A,50,90 L,50,200 A,50,90 L,0,50 A,50,90
S,green,1

T,Good,60,50,50

Will produce a shape similar to the following:

Before executing the commands in the file, the program must check the entire file content to ensure it is in the correct format. If there is any error in the file content, the program must
display a useful error message, informing the user about the lines containing errors, then exit. The program should be able to tolerate minor errors such as lowercase letters or extra spaces before or after commas. Also, the program should be able to handle all exceptions including TypeError, ValueError, FileNotFoundError or any other exceptions. Whenever possible, use input validation to prevent exceptions rather than handling them afterwards.

Constraints
1. You must utilise sequence types such as lists, tuples or dictionaries in your program.
2. You must not import any modules other than turtle and your own created modules.

Your assignment should consist of following tasks.

Task 1
Draw two flowcharts that represent the file processing and file checking algorithms. You can abstract the defined functions using function symbols, but the main flowcharts should provide sufficient level of details for the logic of your algorithms.

You can draw the flowcharts with a pen/pencil on a piece of paper and scan it for submission, as long as the handwriting is clear and legible. However, it is strongly recommended to draw flowcharts using a drawing software.

Task 2
Select six sets of test data that will demonstrate the 'normal' operation of your program; that is, test data that will demonstrate what happens when a VALID input is entered. Select four sets of test data that will demonstrate the 'abnormal' operation of your program.

Set out the test cases in a tabular form as follows. It is important that the output listings (i.e., screenshots) are not edited in any way.

Task 3
Implement your algorithm in Python. Comment on your code as necessary to explain it clearly. Run your program using the test data you have selected and complete the final column of test data table above.
Your submission will consist of:
1. Your algorithm through flowchart/s
2. The table recording your chosen test data and results
3. Source code for your Python implementation
Thus your directory for Assignment will at least contain two or three files (depending on whether you put the flowchart and the test table in the same file).

It is critically important that your test runs are unmodified outputs from your program, and that these results should be reproducible by the marker running your saved .py python program.

RATIONALE
This assessment task will work towards assessing the following learning outcome/s:
• be able to analyse the steps involved in a disciplined approach to problem-solving, algorithm development and coding.
• be able to demonstrate and explain elements of good programming style.
• be able to identify, isolate and correct errors; and evaluate the corrections in all phases of the programming process.
• be able to interpret and implement algorithms and program code.
• be able to apply sound program analysis, design, coding, debugging, testing and documentation techniques to simple programming problems.
• be able to write code in an appropriate coding language.

Attachment:- File Processing.rar

Reference no: EM132739365

Questions Cloud

Which is a characteristic of an asset : Which of the following is a characteristic of an asset? When a business receives payment before delivering goods, the revenue account is
Calculate the labor productivity for pccorp : Calculate the labor productivity for PCCorp with respect to units shipped.
Define solutions for wage rate compression : Basically this is a problem of wage rate compression in the problem. Can you please provide solutions for wage rate compression? Presently company has no money.
Which statements about the users of financial information : Which statements about the users of financial information is incorrect? Taxing authorities are external users. / Regulatory authorities are internal users
Implement your algorithm in python : Draw two flowcharts that represent the file processing and file checking algorithms. You can abstract the defined functions using function symbols
What is the average inventory of electric motors : A distributor of electric motors experiences an annual demand of 10,000 motors which cost $30 per motor. She orders the motors in a batch ordering process
Why has the hrm function increased in stature : Why has the HRM ( Human Resource Management) function increased in stature and influence in many organization and How has increased globalization influenced.
How trial balance column totals will therefore differ by : A P800 credit item is accidentally posted as a debit. The trial balance column totals will therefore differ by? Which Books of accounts include
Compute the net present value and internal rate of return : Muskoka Landscaping Ltd. is planning to buy equipment costing $25,000 to improve its services. Compute the net present value and internal rate of return

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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