The correct answer is:
if age > 40:
discount = discount + (0.15 * amount)
if category == 'C':
discount = discount + (0.55 * amount)
The code first checks if the client's age is greater than 40. If it is, a 15 percent discount is applied. Then, it checks if the category is 'C', and if it is, an additional 55 percent discount is applied. This code incorporates the given policies correctly.
Use the code to answer the question. if age > 40: # 15 percent discount discount = discount + (0.15 * amount) if category == 'A': # 10 percent discount discount = discount + (0.1 * amount) Revise the code to incorporate the given policies: If the client is older than 40 and he buys from category “C,” he gets a discount of 55 percent. All discount policies for category “A” are revoked. (1 point) Responses if age > 40: # 15 percent discount discount = discount + (0.15 * amount) if category == C: # 55 percent discount discount = discount + (0.55 * amount) if age > 40: # 15 percent discount discount = discount + (0.15 * amount) if category == C: # 55 percent discount discount = discount + (0.55 * amount) if age > 40: # 15 percent discount discount = discount + (0.15 * amount) if category == 'C': # 55 percent discount discount = discount + (5.55 * amount) if age > 40: # 15 percent discount discount = discount + (0.15 * amount) if category == 'C': # 55 percent discount discount = discount + (5.55 * amount) if age > 40: # 15 percent discount discount = discount + (0.15 * amount) if category == 'A': # 55 percent discount discount = discount + (0.55 * amount) if age > 40: # 15 percent discount discount = discount + (0.15 * amount) if category == 'A': # 55 percent discount discount = discount + (0.55 * amount) if age > 40: # 15 percent discount discount = discount + (0.15 * amount) if category == 'C': # 55 percent discount discount = discount + (0.55 * amount)
1 answer