Select all that apply. Assume you are writing a program that calculates a user's total order cost that includes sales tax of 6.5%.
Which of the following are advantages of using a named constant to represent the sales tax instead of simply entering 0.065 each time the tax is required in the code?
A) It will be easier for another programmer who may need to use this code to understand the purpose of the number wherever it is used in the code.
B) If the tax amount changes to 7.0%, the value will only have to be changed in one place.
C) It allows the end-user to always see the value of the sales tax.
D) It avoids the risk that any change to the value of sales tax will be made incorrectly or that an instance of the tax value might be missed as might occur if the number had to be changed in multiple locations.
Correct Answer:
Verified
Q29: Select all that apply. Which of the
Q30: To use Python's turtle graphics,you must include
Q31: What is the output of the following
Q32: A(n)_ is a name that represents a
Q33: The _ specifier is a special set
Q35: _ are notes of explanation that document
Q36: When applying the .3f formatting specifier to
Q37: When the + operator is used with
Q38: The Python turtle is initially positioned in
Q39: The _ built-in function is used to
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents