Python Program Help, Python Programming

Write a Python program to accomplish the following. Use modular design. Include at least 3 functions: one that returns zero values, one that returns one value, and one that returns more than one value. Do all your input from an external text file, created by you according to the file specs given below. Place your output in an external text file. Submit your source code via Blackboard. Also turn in a printout of your source code and a printout of the program’s results which you placed in an external text file named “prog4out.txt”. You don’t need to give Blackboard your output file. Please do not include any directory names in your external text file references. Name your external input file “prog4input.txt”.

The Village Variety Store is having its annual Christmas sale. Its owners would like you to write a program to produce a daily report for the store. Each item sold is identified by an item code consisting of one letter followed by one digit. Your report should include data for all items in the file. Your program must work for any number of items. You may assume the first record(line) in the file indicated the number of items present in the file. Each of the three lines of data will include an item code, number of unique items sold, original item price, and reduction percentage. Your report should include a chart with the input data, sales price per item, and total amount of sales generated by the item. Also print a daily summary. Assume the file contains store sales for one day.

An example input data file follows:
3
A7 13 5.95 15
R5 24 7.95 20
T2 80 3.95 50

Your output file must be formatted as follows:

Village Variety Store

Item Code Number Sold Original Price Reductions Sales Price Income
------------- ----------------- ----------------- -------------- ------------- ----------

A7 13 $5.95 15% $5.06 $65.78
R5 24 $7.95 20% $6.36 $152.64
T2 80 $3.95 50% $1.98 $158.40
<3 blank lines>


Daily Summary:
------------------

Total number of items sold: 117

Revenue lost due to reductions: $207.33

Total income: $376.82





Posted Date: 12/6/2012 12:54:39 PM | Location : United States







Related Discussions:- Python Program Help, Assignment Help, Ask Question on Python Program Help, Get Answer, Expert's Help, Python Program Help Discussions

Write discussion on Python Program Help
Your posts are moderated
Related Questions
Perimeter of a polygon Now, let's consider the problem of computing the length  of the perimeter of a polygon. The input is a structure of vertices,  encoded as a list of list

Non-local references So far, whenever we needed to compute a variable, there  was  a binding for that  variable in the 'local' environment (the environment in which  we were e

Range Very frequently, we will want to iterate through a list of integer values, often as indices.  Python gives a useful function, range, which gives lists of integers. It ma

Python Programs You must submit the source code and samples of output for each program.Please do not provide python file (eg. Filename.py). Copy all source code to one word fi

Structured assignment Once  we have  tuples and lists, we may use  a nice trick  in assignment expression, based  on the packing and unpacking of tuples. >>> a, b, c = 1, 2


For this assignment, you need to create a program that allows the user to do basic trigonometry functions. First, ask the user if he or she would like to do sine, cosine, or tangen

What are squared matrices?

Every programming language has to have  some method for indicating grouping of operations. Here is how you execute an if-then-else structure in Java:   if (s == 1){ s = s

#Why can''t I cd my Desktop? A minute ago I would open up cmd and it starts in C:\Users\myname but now it''s starting in C:\WINDOWS\system> and I don''t where I am or how to get ou