5.03 Boolean (CPI) Question Preview (ID: 44857)


Test Your Knowledge In Computer Programming.

If 5 and 2 are entered in txtNumber1 and txtNumber2, respectively, what will the following code display?
a) 1
b) 2
c) 3
d) 5

Which logical condition will determine if the AccountBalance is not less than CreditLimit?
a) AccountBalance = CreditLimit
b) AccountBalance CreditLimit
c) AccountBalance = CreditLimit
d) AccountBalance = CreditLimit

North Carolina allows a teenager to have a learner’s permit if he/she is 15 and has had driver’s education training. Consider the intAge and blnHasHadDrivEd variables. Which of the following If conditions would allow a learner’s permit?
a) intAge 16 And blnHasHadDrivEd = True
b) intAge = 15 And blnHasHadDrivEd = True
c) intAge = 15 Or blnHasHadDrivEd = True
d) intAge 14 Or blnHasHadDrivEd = True

A meat packer grades meat “P” for Prime, “C” for Choice, “S” for Standard, and “G” for Good. Which case expression will represent ChoiceMeat?
a) Case Else
b) Case C
c) Case P, S
d) Case CGSP

If the 12 months are numbered 1 through 12, which statement generates a random whole number to represent one of the months, given the following code?
a) gen.Next(1, 13)
b) gen.Next(1,11)
c) gen.Next(1,12)
d) gen.Next(12)

If the 7 weekdays are numbered 1 through 7, which statement generates a random whole number to represent one of the days, given the following code?
a) gen.Next(1,8)
b) gen.Next(1,7)
c) gen.Next(7)
d) gen.Next(1, 6)

Which condition is correct?
a) Case 2, 5
b) Case 2 And 5
c) Case 2 - 5
d) Case 2 Or 5

Which statement generates random whole numbers greater than or equal to 10 and less than 51, given the following code?
a) B gen.Next(10, 51)
b) gen.Next(9, 50)
c) gen.Next(10, 50)
d) gen.Next(9, 51)

Which case condition is correct?
a) Case Is 10
b) Case = 10
c) Case 10
d) Case To 10

If there are 6 sides on a die, which statement generates a random whole number to represent one of the sides, given the following code?
a) gen.Next(1, 7)
b) gen.Next(0,7)
c) gen.Next(1, 6)
d) gen.Next(6)

Play Games with the Questions above at ReviewGameZone.com
To play games using the questions from above, visit ReviewGameZone.com and enter game ID number: 44857 in the upper right hand corner or click here.

TEACHERS / EDUCATORS
Log In
| Sign Up / Register