Unit 2 and 3 Review Flashcards
The proper use of syntax in a programming language is called \_\_\_\_\_\_\_\_\_\_\_\_. A. modularization B. programming documentation C. programming logic D. programming style
D. programming style
Which expresses the step-by-step instructions of an algorithm by using keywords, while depicting logical groupings or structures using indentation? A. A flowchart B. A storyboard C. Methods D. Pseudocode
D. Pseudocode
Which is NOT a characteristic of commenting?
A. Comments begin with a ‘.
B. Comments begin with a “.
C. Comments can be on their own line or after a line of code.
D. Comments will turn the text green.
B. Comments begin with a “.
Which of the choices below is MOST FREQUENTLY considered an expectation for commenting?
A. Not every line should be commented, but any line that performs an operation should
B. Any line that causes confusion should be commented
C. Comment every line
D. At the top of the program there should be comments on the purpose and scope of the program.
B. Any line that causes confusion should be commented
In flowchart symbols, which symbol is used to show decisions? A. Parallelogram B. Rectangles C. Ovals D. Diamonds
D. Diamonds
In flowchart symbols, which symbol represents the start and the end process? A. Parallelogram B. Rectangles C. Ovals D. Diamonds Response Feedback: 2.02
C. Ovals
Which statement would change the color of the form to blue? A. BackColor(Color.Blue) B. BackColor.Text = Color.Blue C. BackColor = Blue D. BackColor = Color.Blue
D. BackColor = Color.Blue
The programming process begins with a meeting between the programmer and the client. Which activity would be the second step in the programming process? A. Designing the solution B. Documenting the solution C. Testing the solution D. Validating the design
A. Designing the solution
What would BEST replace the "?" on Line 4 in the figure? Begin get x get y ? sum = x + y + z print sum End A. get x + z B. get z C. print x D. print y
B. get z
What is most frequently used design in the programming process? A. Top-Down Design B. Bottom-Up Design C. Analysis Design D. The Spiral Model
A. Top-Down Design
What are the methods to show the steps to solve a problem? A. Algorithm, drawings, sequence B. Algorithm, flowcharts, pseudocode C. Algorithm, program code, structure D. Labels, flowcharts, pseudocode Response Feedback: 2.02
B. Algorithm, flowcharts, pseudocode
The following is an example of what? Wash hair. Rinse. Repeat. A. A SIMPLESEQUENCE Control Structure B. A DOWHILE infinite loop C. A series of instructions D. A DOWHILE loop
B. A DOWHILE infinite loop
Angie is programming an application where the user needs to select their age from five different choices. What is the best control to use? A. Check box B. Label C. Radio Button D. Textbox
C. Radio Button
Which is NOT a characteristic of commenting?
A. Comments can be on their own line or after a line of code.
B. Comments begin with a ‘.
C. Comments begin with a “.
D. Comments will turn the text green.
C. Comments begin with a “.
What is the correct code to create a two line return from the following code?
lblcost. Text = “The cost of the product is: “& (deccost + dectax)
A. lbl.Cost.Show = “The cost of the product is: “vbCrLf & (deccost + dectax)
B. lblCost.Text = “The cost of the product is: “ & vbCrLf & (deccost + dectax)
C. lbl.Cost.Show “The cost of the product is: “& (deccost + dectax)
D. lblCost.Text = “The cost of the product is: “vbCrLf & (deccost + dectax)
B. lblCost.Text = “The cost of the product is: “ & vbCrLf & (deccost + dectax)
What are multi-line comments called? A. Multiple line B. Block C. Single Line D. Line
B. Block
Which control is used to get written input from the user? A. Button B. RadioButton C. TextBox D. Label
C. TextBox
What is an acceptable comment for line 2 of the Visual Basic program below?
Private Sub Form_Load()
MessageBox.Show(“Hello World!”)
End Sub
A. ! Execute a simple message box that will say “Hello, World!”
B. // Execute a simple message box that will say “Hello, World!”
C. ‘Execute a simple message box that will say “Hello, World!”
D. Execute a simple message box that will say “Hello, World!”
C. ‘Execute a simple message box that will say “Hello, World!”
Tricia decided that the computer program she was designing should be coded in Visual Basic She then began to code the program from her pseudocode. This exemplifies which stage in the programming process? A. Design the Solution B. Identify the Problem C. Test the Program D. Write the Program
D. Write the Program