Question: 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
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
