Python Program Help, Python Programming

Assignment Help:
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






Related Discussions:- Python Program Help

Help, When investing money, an important concept to know is compound intere...

When investing money, an important concept to know is compound interest. The equation FV = PV (1+rate)periods . This relates the following four quantities. The present value (

Modules, Modules As you start to write larger programs, you will want ...

Modules As you start to write larger programs, you will want  to save the function de?nitions in multiple ?les, collected together according to what  they  do.  So, for exampl

Interaction and debugging, We encourage you to adopt an interactive style o...

We encourage you to adopt an interactive style of debugging and programming. Use the Python shell a lot. Write short pieces of code and check them.  It is much  simpler to test the

Variables, Variables We cannot  go very far without variables. A variabl...

Variables We cannot  go very far without variables. A variable is a value related to a name that we can bind  to have a particular value  and  then  later use in an expression.

Bank transfer, Bank transfer What  if we  have  two  values,  represen...

Bank transfer What  if we  have  two  values,  representing bank  accounts, and  need  to transfer an  amount of money  amt between them?  Consider that a bank account is show

Top-down approach, what are the issues assciated with top-down analysis

what are the issues assciated with top-down analysis

Question, Data array A has data series from 1,000,000 to 1 with step size 1...

Data array A has data series from 1,000,000 to 1 with step size 1, which is in perfect decreasing order. Data array B has data series from 1 to 1,000,000, which is in random order.

Example of python code, Worked example 1   Let's examine what  happens...

Worked example 1   Let's examine what  happens when  we compute the following Python code:   def p(x, y): z = x*x - y return z + 1/z   >>> p(1.0, 2.0) -2.0

assignment 10, #question.Program 10 Assignment (Banking Objects – Savings/...

#question.Program 10 Assignment (Banking Objects – Savings/Checking Accounts) Create a program named 10.py that performs the following: Create a class named ChkAcct, and a class n

Re-writing a C++ code in Python with the help of ctypes, I have a C++ code ...

I have a C++ code (10-15 line) which i need to re-write in python with the help of ctypes library. Is it possible i can get some help with it? Thanks & regards Tanmoy

Write Your Message!

Captcha
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