
NAME___________________________________________________
Wentworth Institute of Technology
Division of Professional and Continuing Studies
COMP112 Section 71 – Intro to Computers and Programming - Spring, 2008
Quiz 2 – Open Book – FOR THE MULTIPLE CHOICE QUESTIONS, THERE IS
POSSIBLY MORE THAN ONE CORRECT RESPONSE. I WILL COMPUTE YOUR
GRADE USING THE BEST 10 out of 12 QUESTIONS YOU ANSWER.
1. List 5 reasons for using functions and sub-procedures in your programs.
a._________________________________________________________
b._________________________________________________________
c._________________________________________________________
d._________________________________________________________
e._________________________________________________________
2. Write an expression that sets j equal to a random number
a. Between 1 and 6
b. Between 80 and 90 HINT: 80 to 90 is a total of 11, not 10 numbers.
3. Write the value of the following expressions: (HINT: test these in Immediate mode)
a. LEFT("Mary had a little lamb", 8)_________________________________
b. MID("My Bonnie lies over the ocean", 12, 3)_____________________
c. LEN("Happy Birthday")_______________________________________________
d. InStr("The Phantom Menace", "tom")________________________________
4. Draw the flowchart symbol that indicates a decision statement (branches to more than one direction of flow of the
program based on the results of an IF statement)
5. What VB keyword (statement) do you use to allocate space in memory for a variable?
6. List 5 different primitive Datatypes that you can use in VB.
a. ____________________________________________________________________________
b. ____________________________________________________________________________
c. ____________________________________________________________________________
d. ____________________________________________________________________________
e. ____________________________________________________________________________
/app/work/qkda3y-363745-2765013-quiz2comp112sp08-doc.doc 12/3/2020 1