Answered step by step
Verified Expert Solution
Link Copied!

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 program5_1.py 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 3 to 10, 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 50 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 well-structured, with a main function and a separate module file for the custom function.
The code should be clean, readable, and well-commented.
The program should handle input and output correctly, with prompts and output formatted as in the example input/output.
EXAMPLE INPUT/OUTPUT
Enter the number of different types of shoelaces being purchased: 2
Item 1:
Enter the number of eyelet pairs: 3
Enter the quantity: 1
Subtotal for Item 1: $1.50
Item 2:
Enter the number of eyelet pairs: 4
Enter the quantity: 2
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

Students also viewed these Databases questions