Code.org Unit 7 Assessment Day

Code.org Unit 7 Assessment Day

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

D W

Used 700+ times

FREE Resource

About this resource

This quiz assesses core programming concepts at the high school level, specifically focusing on computational thinking and programming fundamentals appropriate for grades 9-12. Students need a solid understanding of procedural programming, including function calls, parameter passing, and return values. The problems require knowledge of algorithm design, string manipulation through substring operations, sequential program execution, and library usage. Students must demonstrate proficiency in reading and interpreting code, understanding APIs and function documentation, trace program execution to predict outputs, and apply mathematical reasoning to solve computational problems. The quiz emphasizes practical programming skills such as robot navigation algorithms, working with imported libraries, and data processing procedures that form the foundation of computer science education. Created by D W, a Computers teacher in US who teaches grade 9-12. This assessment serves as an excellent tool for evaluating student mastery of fundamental programming concepts and can be effectively used as a unit assessment, review activity, or formative evaluation of computational thinking skills. Teachers can deploy this quiz after instruction on procedures, libraries, and basic algorithms to gauge student readiness for more advanced programming topics. The variety of question types makes it ideal for identifying specific areas where students may need additional support, whether in algorithm design, code tracing, or understanding function parameters. This assessment aligns with CSTA K-12 Computer Science Standards, particularly 3A-AP-13 (creating prototypes), 3A-AP-14 (using lists to simplify solutions), and 3A-AP-17 (decomposing problems into smaller tasks), supporting comprehensive evaluation of student progress in computational problem-solving.

See more

Student preview

quiz-placeholder

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which code segment will guarantee that the robot makes it to the grey square without hitting a wall or a barrier (black square)?


Here is the API for a robot library.

// moves the robot forward

function moveForward();


// turns the robot to the left

function rotateLeft();


// turns the robot to the right

function rotateRight();


// checks if a robot can move in any direction

// direction {string} - the direction to be checked

// return {Boolean} - true if the robot can move in that direction, otherwise returns false

function canMove(direction);

Media Image
Media Image
Media Image
Media Image

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

You have imported a library with the birthMonth() function. Based on the API, how many strings are inputed to calculate the birth month?

1

4

0

3

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which term refers to a solution to a large problem that is based on the solutions of smaller subproblems.

procedural abstraction

API

modularity

library

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

This function finds the minimum number in a list. What should <MISSING CODE SEGMENT> be replaced with in order for this function to operate as expected?

numList[i] = min;

min = numList[i];

min = numList;

numList = min;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is one of the benefits of using a library in a program?

simplifies creating a complex program

increases development time

removes all testing

reduces abstractions in the program

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Barry is making a program to process user birthdays.

The program uses the following procedure for string slicing:


NameDescriptionSUBSTRING (string, startPos, numChars)Returns a substring of string starting at startPos of length numChars. The first character in the string is at position 1.


His program starts with this line of code:

userBday ← "03/31/84"


Which of these lines of code displays the day of the month ("31")?


Choose 1 answer:

display (substring (userBday, 3, 1)

display (substring (userBday, 3, 3)

display (substring (userBday, 4, 1)

display (substring (userBday, 4, 2)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Marlon is programming a simulation of a vegetable garden. Here's the start of his code:

temperature ← 65

moisture ← 30

acidity ← 3

DISPLAY (acidity)

DISPLAY (temperature)

DISPLAY (moisture)

65 30 3

3 30 65

3 65 30

8.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Landry is writing a program to help her calculate how long it will take to read the books she received for Christmas.

The procedure calcReadingHours returns the number of hours it will take her to read a given number of pages, if each page takes a given number of minutes to read.

PROCEDURE calcReadingHours(numPages, minPerPage)

{

totalMin ← numPages * minPerPage

RETURN totalMin / 60

}

Landry then runs this line of code:

hoursNeeded ← calcReadingHours(180, 2)

What value is stored in hoursNeeded?