Unit 4 #4

Unit 4 #4

12th Grade

10 Qs

quiz-placeholder

Similar activities

CĐ2-B5. LÍ THUYẾT PEPTIT

CĐ2-B5. LÍ THUYẾT PEPTIT

12th Grade

8 Qs

Lewis dot structures

Lewis dot structures

12th Grade

12 Qs

Command Terms - IBDP Chemistry

Command Terms - IBDP Chemistry

11th - 12th Grade

15 Qs

Estructura atómica 4°medio

Estructura atómica 4°medio

12th Grade

10 Qs

Exceptions to Octet Rule & Resonance Structures

Exceptions to Octet Rule & Resonance Structures

12th Grade

11 Qs

on tap 12A2-1

on tap 12A2-1

10th - 12th Grade

10 Qs

lt amino axit

lt amino axit

11th - 12th Grade

10 Qs

HÓA 12: TỔNG ÔN LÝ THUYẾT SỐ 6.2

HÓA 12: TỔNG ÔN LÝ THUYẾT SỐ 6.2

12th Grade

10 Qs

Unit 4 #4

Unit 4 #4

Assessment

Quiz

Chemistry

12th Grade

Easy

Created by

Clifford Buckles

Used 5+ times

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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?

Media Image
Media Image
Media Image
Media Image

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.jpgFireworks​2017-10-18-Grandmas-Birthday.jpgGrandmas-Birthday

The photographer has the following procedures available.

Procedure CallExplanation​TrimLeft (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 ?

  1. -descr ← TrimLeft (TrimRight (original, 4), 11)

  2. -descr ← TrimLeft (TrimRight (original, 11), 4)

  3. -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

Media Image

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.

Media Image
Media Image
Media Image
Media Image

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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.

Media Image
Media Image
Media Image
Media Image

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?