Answered step by step
Verified Expert Solution
Question
1 Approved Answer
def findLowestPrice ( products , discounts ) : total = 0 for test _ case in range ( len ( products ) ) : min
def findLowestPriceproducts discounts:
total
for testcase in rangelenproducts:
minprice floatinf
for i in productstestcase:
price inti
prices
for j in range leni:
val
if ij 'EMPTY':
val price
else:
for k in discountstestcase:
if k ij:
a b intk intk
break
if a :
val b
elif a :
val roundprice price b
elif a :
val price b
prices.appendval
minprice minminprice, sumprices
total minprice
return total
fix this code
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