Monday, February 3, 2014
Section 3.1: Numbers - Variable Names
85016: Of the following variable names, which is the best one for keeping track of whether a patient has a fever or not?
temperature
feverTest
hasFever - correct answer
fever
Of the following variable names, which is the best one for keeping track of whether an integer might be prime or not?
divisible
isPrime
mightBePrime - correct answer
number
60106: Which of the following is NOT a legal identifier?
outrageouslyAndScockinglyLongRunon
_42
_
lovePotionNumber9
7thheaver - correct answer
60110: Which is the best identifier for a variable to represent the amount of money your boss pays you each month?
notEnough
wages
paymentAmount
monthlyPay - correct answer
money
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment