, , , ,

[SOLVED] It 210 programming assignment 3

$25

File Name: It_210_programming_assignment_3.zip
File Size: 292.02 KB

Categories: , , , , Tags: , , , ,
5/5 - (1 vote)

Your program should expect to read a file similar to the one shown below (and also available on D2L).
Your program should:
• Prompt for the name of the file to process and issue an error message and terminate if that file
can’t be opened
• Verify that each line has the correct number of items and terminate if it does not
• Verify that the dollar amount is a valid floating-point number and terminate if it is not
• Keep a list with the categories that are encountered (they may be different than below) and
another list with the cumulative dollar amount for each category. These are two lists but the
elements in one relate to the elements in the other (by position)
• Close the file when all the data has been processed
• Display the categories and the total for each one
Sample input file:
Bob;Dinner;10.00;January 1, 2015
Tom;Dinner;14.00;January 2, 2015
Anne;Lodging;125.00;January 3, 2015
Jerry;Lodging;125.00;January 4, 2015
Output from running with the above correct file should be:
Enter the name of the file to display: input.txt
Totals:
Dinner: $ 24.00
Lodging: $ 250.00
The wordings of messages given when the program must terminate because of an error are your choice
but must be clear, correct English.
Submit your program to the designated D2L drop box. Your program should be named PA3.py. For
programming assignments, early submissions gain a bonus percent: 1 day early – 10%; 3 or more days
early – 20%.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] It 210 programming assignment 3
$25