Unit 4 #4
Quiz
•
Chemistry
•
12th Grade
•
Easy
Clifford Buckles
Used 5+ times
FREE Resource
Enhance your content
10 questions
Show all answers
1.
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.
Let the value of the variable xVal be 6 and the value of the variable yVal be 5. Which of the following code segments can be used to draw the figure?
drawLine(1, 5, xVal, yVal)
drawline(1, 5, xVal, yVal + 2)
drawline(1, 5, xVal, yVal + 2)
drawLine(1, 5, xVal, yVal)
drawline(1, 5, xVal, yVal + 2)
drawline(1, 5, xVal, yVal - 2)
drawLine(1, 5, xVal, yVal)
drawline(1, 5, xVal + 2, yVal + 2)
drawline(1, 5, xVal + 2, yVal - 2)
drawLine(1, 5, xVal, yVal)
drawline(1, 5, xVal + 2, yVal + 2)
drawline(1, 5, xVal - 2, yVal - 2)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The procedure Draw (length, direction) is used to draw a line segment length units long in a given direction (left, right, up, or down), starting at the current cursor position. The cursor is then repositioned at the end of the line segment that was drawn. Consider the following program, where the cursor starts in the upper left corner of a grid of dots. The dots are spaced one unit apart.
Draw (1, right)
Draw (2, down)
Draw (1, left)
Draw (1, right)
Draw (1, up)
Draw (1, left)
Which of the following represents the figure that is drawn by the program?
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A photographer has a collection of digital pictures, each using the same file-naming format: a date tag, followed by a description, followed by the file extension ".jpg". The photographer wants to write a code segment to extract the description from each file name, as shown in the following table.
Original File NameExtracted Description2016-05-22-Andrews-Graduation.jpgAndrews-Graduation2016-07-04-Fireworks.jpgFireworks2017-10-18-Grandmas-Birthday.jpgGrandmas-Birthday
The photographer has the following procedures available.
Procedure CallExplanationTrimLeft (str, n)Returns a copy of the string str with the n leftmost characters removed. For example, TrimLeft ("keyboard", 3) returns "board".TrimRight (str, n)Returns a copy of the string str with the n rightmost characters removed. For example, TrimRight ("keyboard", 3) returns "keybo".
Let an original file name be stored in the string variable original. Which of the following statements will correctly extract the description and store it in the string variable descr ?
-descr ← TrimLeft (TrimRight (original, 4), 11)
-descr ← TrimLeft (TrimRight (original, 11), 4)
-descr ← TrimRight (TrimLeft (original, 11), 4)
I only
II only
I and III
II and III
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A student’s overall course grade in a certain class is based on the student’s scores on individual assignments. The course grade is calculated by dropping the student’s lowest individual assignment score and averaging the remaining scores.
For example, if a particular student has individual assignment scores of 85, 75, 90, and 95, the lowest score (75) is dropped. The calculated course grade is (85+90+95)/3=90.
A programmer is writing a program to calculate a student’s course grade using the process described. The programmer has the following procedures available.
Procedure CallExplanationMin (numList)Returns the minimum value in the list numListSum (numList)Returns the sum of the values in the list numList
The student’s individual assignment scores are stored in the list scores. Which of the following can be used to calculate a student’s course grade and store the result in the variable finalGrade?
finalGrade ← Sum (scores) / LENGTH (scores)
finalGrade ← finalGrade - Min (scores)
finalGrade ← Sum (scores) / (LENGTH (scores) - 1)
finalGrade ← finalGrade - Min (scores)
finalGrade ← Sum (scores) - Min (scores)
finalGrade ← finalGrade / LENGTH (scores)
finalGrade ← Sum (scores) - Min (scores)
finalGrade ← finalGrade / (LENGTH (scores) - 1)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The figure below shows a robot in a grid of squares. The robot is represented as a triangle, which is initially facing upward. The robot can move into a white or gray square but cannot move into a black region.
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 toward the top of the grid.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following procedure.
Procedure CallExplanationdrawCircle(xPos, yPos, rad)Draws a circle on a coordinate grid with center (xPos, yPos) and radius rad
The drawCircle procedure is to be used to draw the following figure on a coordinate grid.
Let the value of the variable x be 2, the value of the variable y be 2, and the value of the variable r be 1. Which of the following code segments can be used to draw the figure?
drawCircle(x, y, r)
drawCircle(x, y + 2, r)
drawCircle(x + 2, y, r)
drawCircle(x + 2, y + 2, r)
drawCircle(x, y, r)
drawCircle(x, y + 3, r)
drawCircle(x + 3, y, r)
drawCircle(x + 3, y + 3, r)
drawCircle(x, y, r + 2)
drawCircle(x, y + 2, r + 2)
drawCircle(x + 2, y, r + 2)
drawCircle(x + 2, y + 2, r + 2)
drawCircle(x, y, r + 3)
drawCircle(x, y + 3, r + 3)
drawCircle(x + 3, y, r + 3)
drawCircle(x + 3, y + 3, r + 3)
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
ĐỀ 16
Quiz
•
9th - 12th Grade
10 questions
CHM 9Adv Scientific method
Quiz
•
9th - 12th Grade
10 questions
Ser Bachiller 4 (13th)
Quiz
•
1st - 12th Grade
10 questions
Covalent Review Stations Exit Ticket
Quiz
•
10th - 12th Grade
13 questions
Quantum Numbers Quiz 4
Quiz
•
10th - 12th Grade
11 questions
epic
Quiz
•
3rd Grade - Professio...
10 questions
Unit 4 #3
Quiz
•
12th Grade
10 questions
Kiểm tra lý thuyết hữu cơ - nâng cao
Quiz
•
12th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Chemistry
20 questions
Electron Configuration
Quiz
•
10th - 12th Grade
20 questions
Electron Configuration & Orbital Notation
Quiz
•
9th - 12th Grade
18 questions
Energy Levels, Sublevels, and Orbitals
Quiz
•
10th - 12th Grade
20 questions
Electronic Configuration
Quiz
•
12th Grade
59 questions
Unit #5 Periodic Trends Practice Test
Quiz
•
10th - 12th Grade
18 questions
Ions
Quiz
•
9th - 12th Grade
30 questions
ERHS Chem Chapter 2 - The Atom
Quiz
•
9th - 12th Grade
16 questions
Atomic structure and the periodic table
Quiz
•
10th - 12th Grade