A)Which is a type of error within the sequence of characters that is written in a programming language?(1 point)

data error
syntax error
print error
processing error
A)
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)
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 == '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 + (5.55 * amount)
A)If you were creating code to extract data and you needed to access an established collection of resources to acquire pre-written code and routines or mousing to extract this data to reduce code and implement an already known working code that operates correctly?(1 point)
data structure
Boolean
library
script

1 answer

A) The correct answer to the first question about the type of error within the sequence of characters written in a programming language is syntax error.

For the code revision question, the correct code to incorporate the given policies would be:

if age > 40:
    if category == 'C':
        # 55 percent discount
        discount = discount + (0.55 * amount)

This implementation checks if the age is greater than 40 and only applies a discount for category 'C', in accordance with the provided specifications. All discount policies for category 'A' are revoked.

A) For the final question regarding accessing an established collection of resources to acquire pre-written code, the correct answer is library.