Review Game Zone
Flash Cards
(current)
Games
Teachers
Search
5.03 Boolean (CPI)
Test Description: Test your knowledge in Computer Programming
Instructions: Answer all questions to get your test result.
1) If 5 and 2 are entered in txtNumber1 and txtNumber2, respectively, what will the following code display?
A
2
B
3
C
1
D
5
2) 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
3) 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 14 Or blnHasHadDrivEd = True
C
intAge = 15 And blnHasHadDrivEd = True
D
intAge = 15 Or blnHasHadDrivEd = True
4) 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 CGSP
B
Case Else
C
Case P, S
D
Case C
5) 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(12)
D
gen.Next(1,12)
6) 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,7)
B
gen.Next(1,8)
C
gen.Next(7)
D
gen.Next(1, 6)
7) Which condition is correct?
A
Case 2, 5
B
Case 2 And 5
C
Case 2 - 5
D
Case 2 Or 5
8) Which statement generates random whole numbers greater than or equal to 10 and less than 51, given the following code?
A
gen.Next(9, 50)
B
B gen.Next(10, 51)
C
gen.Next(9, 51)
D
gen.Next(10, 50)
9) Which case condition is correct?
A
Case 10
B
Case To 10
C
Case = 10
D
Case Is 10
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(0,7)
B
gen.Next(1, 6)
C
gen.Next(6)
D
gen.Next(1, 7)
*select an answer for all questions
Check Results & Get Answers
Play Games with the Questions Above
Teachers: Create FREE classroom games with your questions
Click for more info!
©2007-2024
ReviewGameZone.com
|
About
|
Privacy
|
Contact
|
Terms
|
Site Map
WAIT! Find what you needed?
×
Still Looking for the Answers?
Have Another Question?
Play a Review Game with These Questions?
Want to Make Your Own Test Like This One?