Answered step by step
Verified Expert Solution
Question
1 Approved Answer
from constants import ( PID , INV, DISC, PRICE, CID, AGE, BUDGET, SPID, PURCHASE _ NUM, DISCOUNT _ RATE ) # This function solution is
from constants import PID INV, DISC, PRICE, CID, AGE, BUDGET, SPID,
PURCHASENUM, DISCOUNTRATE
# This function solution is provided as an example of a function that uses
# constants, complete with correct documentation.
def getpidproduct: str str:
Returns the ID of product 'product'.
Precondition: 'product' is a valid product.
getpidALL
getpidSEN
return productPID:PID
# This function solution is provided as an example of a function that uses
# constants, complete with correct documentation.
def getinventoryproduct: str int:
Returns the current inventory of product 'product'.
Precondition: 'product' is a valid product.
getinventoryALL
getinventorySEN
return intproductINV:INV
# We provide the docstring for this function to help you get started.
def getdiscountproduct: str str:
Returns the discount type of product 'product'.
Precondition: 'product' is a valid product.
getdiscountALL
'ALL'
getdiscountSEN
'SEN'
pass # replace this line with your solution
# We provide the docstring for this function to help you get started.
def getpriceproduct: str int:
Returns the price of product 'product'.
Precondition: 'product' is a valid product.
getpriceALL
getpriceSEN
getpriceSEN
pass # replace this line with your solution
if namemain:
import doctest
doctest.testmod
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