|
You want to buy a $44.95 sweater, but might not have enough money. A good answer might be:
You (hopefully) picked a relational operator that yields
true when the user CAN pay for the sweater.
| |
Reverse LogicHere is what happens for one run of the program: The true block was executed because the boolean expression was true. Here is another run of the program:How much do you have, in pennies? 5000 You can buy the sweater The false block executed because the boolean expression was false.How much do you have, in pennies? 2000 You can't buy the sweater You need $24.95 more.
Remember that boolean expressions are always
true or false.
By using the correct relational operator ( Here is the program again, with the statements of the true and false branches switched.
| |
QUESTION 8:What boolean expression should fill the blank? Click Here after you have answered the question |