Unit 4 #5
Quiz
•
Chemistry
•
12th Grade
•
Practice Problem
•
Easy
Clifford Buckles
Used 6+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following procedures, which are used to control a device that draws lines on paper.
Consider the goal of using the device to produce the following drawing, where each line shown has a length of 10 units and the horizontal lines are 10 units apart.
The device is positioned at the upper-left corner of a sheet of paper and is facing right. Which of the following code segments will produce the drawing shown?
penDown()
goForward(10)
turnRight(90)
goForward(10)
turnRight(90)
goForward(10)
penDown()
goForward(10)
penUp()
turnRight(90)
turnRight(90)
penDown()
goForward(10)
penDown()
goForward(10)
turnRight(90)
penUp()
goForward(10)
turnRight(90)
penDown()
penDown()
goForward(10)
penUp()
turnRight(90)
goForward(10)
turnRight(90)
penDown()
goForward(10)
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following are ways in which a programmer can use abstraction to manage the complexity of a program?
Select two answers.
response - correct
Responses
Replacing each instance of repeated code with a call to a procedure
Replacing longer variable names with shorter variable names to reduce typing errors
Replacing several lines of documentation with a single line of documentation
Replacing several lines of documentation with a single line of documentation name1, name2, name3, and name4 with a list of strings
called names
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following are benefits of procedural abstraction?
Select two answers.
Procedural abstraction prevents programmers from accidentally using the intellectual property of other programmers.
Procedural abstraction eliminates the need for programmers to document their code.
Procedural abstraction makes it easier for people to read computer programs.
Procedural abstraction provides an opportunity to give a name to a block of code that describes the purpose of the code block.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following procedure.
PROCEDURE doSomething(num1, num2)
{
DISPLAY(num1)
RETURN(num1)
DISPLAY(num2)
}
Consider the following statement.
DISPLAY(doSomething(10, 20))
What is displayed as a result of executing the statement above?
Responses
10 10
10 20
10 10 20
10 20 10
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following procedure.
Procedure CallExplanationdrawLine(x1, y1, x2, y2)Draws a line segment on a coordinate grid with endpoints at coordinates (x1, y1) and (x2, y2)
The drawLine procedure is to be used to draw the following figure on a coordinate grid.
Which of the following code segments can be used to draw the figure?
Responses
xVal ← 1
yVal ← 0
len ← 1
REPEAT 5 TIMES
{
drawLine(xVal, yVal, xVal, yVal + len)
xVal ← xVal + 1
len ← len + 1
}
xVal ← 1
yVal ← 0
len ← 1
REPEAT 5 TIMES
{
drawLine(xVal, yVal, xVal + len, yVal)
yVal ← yVal + 1
len ← len + 1
}
xVal ← 5
yVal ← 0
len ← 5
REPEAT 5 TIMES
{
drawLine(xVal, yVal, xVal, yVal + len)
xVal ← xVal - 1
}
xVal ← 5
yVal ← 0
len ← 5
REPEAT 5 TIMES
{
drawLine(xVal, yVal, xVal + len, yVal)
yVal ← yVal - 1
len ← len - 1
}
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially facing right.
Consider the following procedure.
Which of the following code segments will move the robot to the gray square along the path indicated by the arrows?
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A student is developing a program that allows users to look up the definitions of words that appear in a book.
The student plans to perform a large number of searches through a dictionary containing words and their definitions. The student will use a procedure written by a computer scientist to quickly search the dictionary (and knows that the procedure will return a definition if one is available). The student cannot modify the search procedure written by the computer scientist but can call the procedure by supplying a word.
Which of the following is a true statement about the student’s use of the computer scientist’s search procedure?
The student is changing the search procedure’s internal abstractions.
The student is modifying the search procedure to take a definition as an argument and return the corresponding word.
The student is reusing the computer scientist’s procedural abstraction by knowing what the procedure does without knowing how it does it.
The student is reusing the computer scientist’s procedural abstraction by using duplicate code each time a search needs to occur.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
COMPUESTOS TERNARIOS
Quiz
•
12th Grade
12 questions
Q2. A1_P1. Mol, Masa y Volumen Molar
Quiz
•
12th Grade
15 questions
Ch.3 chem Q=mcT review worksheet
Quiz
•
10th - 12th Grade
10 questions
Kinetics practice 2
Quiz
•
12th Grade
13 questions
Decomposition and Combustion Practice
Quiz
•
9th - 12th Grade
15 questions
Nomenclature up to Multivalent 3U
Quiz
•
10th Grade - University
11 questions
Pergerakan bahan merentasi membran plasma
Quiz
•
12th Grade - University
14 questions
Kc calculations and acids and bases
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Chemistry
20 questions
Types of Chemical Reactions
Quiz
•
9th - 12th Grade
20 questions
Energy Transformations
Quiz
•
9th - 12th Grade
24 questions
Identifying Types of Chemical Reactions
Quiz
•
10th - 12th Grade
20 questions
Atomic Structure
Quiz
•
10th - 12th Grade
24 questions
Unit 4 Test Practice: Bonding and Properties
Quiz
•
10th - 12th Grade
21 questions
Introduction to Moles
Lesson
•
9th - 12th Grade
24 questions
ERHS Chem - Chapter 7 Chemical Reactions
Quiz
•
10th - 12th Grade
13 questions
Balanced Eqns & Cons of Mass
Quiz
•
9th - 12th Grade
