Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
Use the code to answer the question. if age > 40: # 15 percent discount discount = discount + (0.15 * amount) if category == 'A...Question
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)
Answers
There are no human answers yet.
Answered by
GPT 3.5
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.
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.
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.