programming 113
Graded Programming Assignment 5: Focus on Basic file operations, exception handling Save a copy of the file assign5data.txt (attached to the assignment)
Write a program that will
- Open the file assign5data.txt
- Create a second file processed.txt
- Read the numbers from the file one at a time. For each number write into the secondfile, if possible, its i. squareii. square root.
iii. reciprocal (1/number)Use a math module function for the square root.Use exception handling to trap possible errors. - Report the number of items in the original file and the number that were successfullystored in the second file.
- Report the number of each type of error: ValueError, ZeroDivisionError,TypeError
Rubric is applied proportionately to each component (program) in an assignment. If only part of the assignment is submitted, only part of the total score is given.
Excellent (100) |
Strong (85) |
Acceptable (75) |
Poor (50)
|
No Credit (0) |
Weight (% of total)
|
|
Deliverables
|
All required items submitted on time in correct format on Blackboard. |
Most (80-95%) required items submitted on time in correct format. |
70-80% required items submitted on time in specified format. |
Completed less than 70% of required items on time in specified format.
|
Not submitted on Blackboard, or submitted more than 20 hours late.1 |
10
|
Coding standards
|
Fully follows the coding guidelines as presented on Blackboard. Excellent use of white space, variables, code formatting and comments. Code is understandable, and well-organized. |
Mostly follows the coding guidelines. Generally good use white space, variables, code formatting and comments. |
Includes necessary file comments. Minor problems with one or more of use of white space, variables, code formatting and comments. |
Doesn’t include required filecomments.
|
Fails to identify sources for code elements obtained from outside class materials. Obvious evidence of copying. |
20
|
Problem solution |
Addresses all of the problem requirements and provides an effective, cleanly coded solution. Solution code demonstrates an understanding of course concepts. |
Addresses all of the problem requirements. Minor details of the program specification are violated, |
Addresses most of the problem requirements and code shows an effort to cover the course concepts |
Some attempt to address problem requirements. |
Problem requirements have not been addressed. Code shows little understanding of the course concepts. |
40 |
Correctness |
Program always works correctly with all suitable input, producing correct results. |
Program functions correctly for suitable inputs, except for less common cases, generally producing correct results. |
Program produces incorrect results for some inputs, common as well as uncommon (For example, by using incorrect formulas or expressions.) |
Most results are incorrect. |
All results are incorrect, or the program fails to execute because of syntax errors. |
20 |
Output
|
Output is correctly formatted, as specified. |
Formatting may deviate slightly from specs in some places. |
Output formatting is present, but generally doesn’t followspecs. |
Program output isunformatted or doesn’tinclude appropriate text elements.
|
No output. |
10
|
1. No credit for deliverables == no credit for the assignment. For an assignment submitted late, without pre-approval, the maximum score will be no more than 85% of the original maximum. For the complete late policy, see the Programming Assignment guidelines.
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!
NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.
