I’m trying to learn for my Software Development class and I’m stuck. Can you help?
Assignment: Lab Exercise 5
Python: Print Invoice
Python Assignment
The objectives of this lab assignment are as follows:
- Declare variables
- Use comments
- Use escape sequences for both newline and tabs
- Use arithmetic operators
- Output data to the console
Skills Required
To properly complete this assignment, you will need to apply the following skills:
- Create variables
- Perform simply calculations
- Output data to the user
Assignment User Story
As a user I want an application that will print an invoice for tuition, book, and lab fee.
Assignment Requirements
In this application you will calculate the total cost for tuition for one, three-credit class at Columbus State. And you will print a nicely formatted invoice that includes a line for books, lab fees, and tuition. You will then calculate the total of these individual line items and print that total.
When complete, your output should be as pictured below:
Technical/Grading Requirements
You must ensure that the application you submit meets all the technical/grading requirements. Your grade will be based on how well your application follows these requirements:
- The name of your application will be Invoice.py
- You must have a set of comments at the top of the program that identifies the programmer, date, and name of the program file. Furthermore, you must provide a description of what this program is and what it does. Each of these comments must be on individual lines.
- You will be printing string literals: Books, Lab Fees, and Tuition. But these values must be assigned to variables.
- The values for each of the three-line items will be assigned to variables. The value for books is 52.99 while the value for lab fees is 25.00. For the value of tuition, you are to create a variable that multiplies 157.93 * 3 (cost of tuition at Columbus State X three credit hours).
- The printed total must be from a variable that adds together the three-line item costs.
- The top and bottom borders of your invoice will be 50 asterisks.
- The dividing lines within the invoice will be 50 hyphen characters.
- The titles and alignment for all elements in the invoice must match the example shown.
- In your output you must use the newline and tab escape sequences at least once.