Answer:
C. 40
Explanation:
The code uses IF and ELSE statements to carry execute a block of code if any of the statements hold true
OrderTotal here is greater than 100, and this allows the second IF ELSE block to be executed.
The code to be executed is discountAmount = OrderTotal * 0.2
This will be discountAmount = 200 *0.2
therefore, discountAmount = 40.
There's definitely something wrong with your for loop. Try this:
for x in range(n):
You might want to check if all your print statements are correct. You might be missing just a period and it will be counted wrong.
<u>Tokens and its examples:</u>
Token is data type and it is behavior or categorized types. Basically most of programing language will have all five tokens data types and they are.
Operators: - such as mathematic operations such as example: - “+”,”-“
Constants: - which used with CONST in vb.net or #define in c programming language, such as example: - 400,200.
Reserved words:- if , then are all used for if condition where if and then are reserved used in programming language for specific purpose.
Separators: - it used with write a procedure or function, in c languages “()” or “()” in vb.net sub and end sub.
Identifiers: - end user to define variable with data type class and store the value in the programming languages, such as amt = 0, rate=10.5.