Search Header Logo

Project Stem AFE CS Unit 4 Review Test

Authored by Angelito Villalon

Computers

12th Grade

Used 8+ times

Project Stem AFE CS Unit 4 Review Test
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What are the values of the variables a and b after the Python program below has been executed?

a = 5 and b = 10

a = 10 and b = 5

a = 5 and b = 5

a = 10 and b = 10

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

The following images show the same image, but one of them is compressed and the other is not.

The image on the left is compressed and the image on the right is the original.

The image on the right is compressed and therefore it has a larger file size than the original image on the left.

The image on the left is compressed and therefore it has a smaller file size than the original image on the right.

The image on the left is the original image and the image on the right is compressed.

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

While writing a program to regulate the speed of a self-driving car, you find that your software sometimes miscalculates the ideal car speed for city streets to be over 1500 MPH (nearly twice the speed of sound), when it should be approximately 30 MPH. Which of the following strategies would be most efficient to employ in debugging your program?

At the very end of the speed calculations, add an additional line of code that divides the calculated speed by 50 so that the program never produces such high speeds.

After each calculation within your program, insert a temporary statement that displays the most recently calculated value. When running your program, compare the displayed values with the expected values to identify where in the program the error is being introduced.

Starting at the end of your program and working backward, systematically delete each line of code that relates to calculating and re-run the program after each deletion to identify where in the program the error is being introduced.

Delete all of the code relating to speed calculations and rewrite it again.

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Consider the following procedure called square that is meant to multiply a number by itself and return the value. What should go in place of Missing Instructions in order to make this procedure work as intended?

number -- number * number

squared -- number * number

square -- number * number

squared -- number * 2

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Which of the following Python code segments best matches this Scratch block?

x = 0 if x > 0: x = x - 1 else: x = x + 10

int x = 0; if (x > 0) { x = -1; } else { x = 10; }

x = 0 if x > 0 x = x - 1 else x = x + 10

x = 0 if x > 0 { x = x - 1 } else { x = x + 10 }

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following describes a lossy transformation of a digital image composed of pixels which have red, green, and blue components stored using values from 0-255?

Replace the green component of each pixel with the average value of the red and blue components of the pixel.

Replace the values for each pixel with the values from the pixel which is 10 pixels to the right. If the pixel is less than 10 pixels from the right of the image, continue counting from the left of the image when the edge is reached.

Swap the values of the blue and green components for each pixel.

Replace each component of each pixel with the original value of that component subtracted from 255.

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

A graphic designer is hired to create a new logo for their client. The client provided the following guidelines, listed in order of precedence:

  • The logo needs to have clean lines, even when scaled to different sizes
  • The logo must use only a few colors
  • The final logo size must not be large

Based on these guidelines, which type of image should the graphic designer create?

PNG

JPG

SVG

GIF

Access all questions and much more by creating a free account

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

Already have an account?