Question: program 6 _ 1 . py PROGRAM OBJECTIVE Your task is to create a program that maintains a record of vinyl LPs that are on
programpy
PROGRAM OBJECTIVE
Your task is to create a program that maintains a record of vinyl LPs that are on sale in a local record store. The program should use a while loop and file operations to capture and store data related to each LP also known as an album.
DELIVERABLES
A Python program named programpy that captures and stores data about vinyl LPs that are on sale.
An output file named lpsale.txt containing the recorded data.
This program shall also meet all requirements stated in the assignment requirements section above and the evaluation criteria stated in the section below and will be scored using the assignment rubric.
INSTRUCTIONS
Open the output file using a with statement.
Start a while loop that continues until the user presses Enter or Return on a Mac for the LP title.
Prompt the user for the following information about each LP:
LP Title: The title of the LP
Artists Names: The names of the artists
Regular Price: The regular price of the LP float
Discount : The discount on the LP during the sale integer
After capturing the details for each LP append the data to a file named lpsale.txt with each piece of data on its own line.
Once the user presses Enter or Return on a Mac for the LP title, display the message, The LP sale data has been successfully stored in lpsale.txt
ADDITIONAL EVALUATION CRITERIA
In addition to the requirements for this module stated in the section above, your program will also be evaluated on the following criteria:
The accuracy of the data captured and stored.
The correct use of a while loop and file operations.
The correct prompt and capture of user input.
The correct creation and formatting of the lpsale.txt file.
The program should handle input and output correctly, with prompts and output formatted as in the example inputoutput
example inputOutput
Enter the album's title: Dionne Warwick's Golden Hits
Enter the artists names: Dionne Warwick
Enter the regular price:
Enter the discount in percent:
Enter the album's title:
Enter the artists names: Taylor Swift
Enter the regular price:
Enter the discount in percent:
Enter the album's title: Meet the Beatles!
Enter the artists names: The Beatles
Enter the regular price:
Enter the discount in percent:
Enter the album's title:
The LP sale data has been successfully stored in lpsale.txt
programpy
PROGRAM OBJECTIVE
The objective of this assignment is to write a Python program that reads a text file and uses the data to create a formatted tabular report. The program should use fstrings and perform any necessary calculations to create the report. The numerical output should be in float format with decimal positions. The report should have columns for each destination variable, with column widths chosen to produce results similar to the example output. Column headings should be included as per the given example. A monospaced font, such as Courier, is recommended to be configured in IDLE settings.
DELIVERABLES
A Python program that reads a text file and generates a formatted table.
The program should use fstrings and perform any necessary calculations.
The program should format numerical output as a float with decimal places.
This program shall also meet all requirements stated in the assignment requirements section above and the evaluation criteria stated in the section below and will be scored using the assignment rubric.
INSTRUCTIONS
Open the input file using a with statement.
Read the text file lpsaletxt created in the previous program programpy
Use fstrings along with any necessary calculations to create a table.
Each row of the table should correspond to a destination, with columns as indicated in the example output.
Format numerical output as a float with decimal places. $ signs are not required.
Choose your own column widths but include column headings as shown in the example output.
ADDITIONAL EVALUATION CRITERIA
In addition to the requirements for this module stated in the section above, your program will also be evaluated on the following criteria:
Correctness of the script: The script should correctly read the text file and generate the desired table.
Use of fstrings: The script should make appropriate use of fstrings to format the table.
Numerical formatting: Numerical output should be correctly formatted as a float with decimal places.
Table formatting: The table should be correctly formatted with appropriate column widths and headings matching that of the example output.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
