Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PROGRAM OBJECTIVE Write a program for a checkout system in a store named Shoestring Store that sells shoestrings. The shoestrings are sold in pairs, their
PROGRAM OBJECTIVE
Write a program for a checkout system in a store named Shoestring Store that sells shoestrings. The shoestrings are sold in pairs, their color, width, and materials are
standard. The shoestrings are only distinguished by the number of pairs of eyelets that it is designed for, which determines their length. The program should be able to
handle the different types of shoestrings being purchased by customers. The types of shoestrings are distinguished by the number of pairs of eyelets of the shoes that they
are for. The program should calculate the subtotal for the number of each type of shoestring pair being ordered and the total cost of the purchase.
DELIVERABLES
A Python program named programpy that meets the requirements outlined in the instructions.
A separate module file containing the custom function for calculating the subtotal of each type of shoestring pair
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
Start by prompting for the number of different types of shoestrings being purchased. This number should be entered as a whole number and will be used to
control how many times the loop repeats.
Start the loop and within each occurrence of the loop prompt for the type the number of eyelets that it is designed for of the shoelace pair and the quantity of
each type of shoestring pair being purchased. The number of pairs of eyelets can vary from to but you can assume that a valid whole number value
within that range is being provided by the end user. You can also assume that a whole number value is being entered for the quantity.
Pass the values for number of eyelets and quantity as arguments to a custom function that is defined in a separate module file.
The imported function should calculate the subtotal for the item and return it to the main function. Each pair of eyelets should be costed at cents. The main
function should print the total cost after the loop ends. The total cost should be reported in currency format as described in the requirements above.
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 program should be able to accurately calculate the subtotal for each type of shoestring pair and the total cost of the purchase.
The program should be wellstructured, with a main function and a separate module file for the custom function.
The code should be clean, readable, and wellcommented.
The program should handle input and output correctly, with prompts and output formatted as in the example inputoutput
EXAMPLE INPUTOUTPUT
Enter the number of different types of shoelaces being purchased:
Item :
Enter the number of eyelet pairs:
Enter the quantity:
Subtotal for Item : $
Item :
Enter the number of eyelet pairs:
Enter the quantity:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started