Search Header Logo

Algorithm and Developing Programs

Authored by Joanna Stevens

9th Grade

10 Questions

Used 8+ times

Algorithm and Developing Programs
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Daniel and Derek are pair programming partners in an introductory computer science course. While creating their Guess My Number game in which the computer tries to guess a number that the human player is thinking of between 1 and 100, Derek pointed out that the reason

their program wasn’t working as expected was because the program generated its next guess before checking with the player to see if the computer generated guess was correct. This is an example of a problem with the use of which programming construct?

Selection

Sequencing

Iteration

Recursion

2.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

A particular algorithm that sorts a list of numbers takes longer to run for long lists than it does for short lists. As the length of the list grows, the amount of time increases exponentially. Which of these could describe the algorithm’s performance? (pick two)

Linear

Constant

Square

Cube

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Consider a robot which can move forward, turn left, turn right, and look ahead within the provided grid. Robots must not share a space with pedestrians, marked with P’s here. Pedestrians move around the grid at random. At a minimum, a robot must use which of the following programming constructs to safely navigate to its charging station, marked C?

Sequencing and Iteration

Iteration and Selection

Sequencing and Selection

Sequencing, Selection, and Iteration

4.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

Media Image

Consider a robot which within the provided grid, can move forward, turn, and check to see if there’s a wall or charging station in front of it. Consider the proposed algorithm to get the robot to its charging station, marked C.

Step 1: Move Forward

Step 2: If Charging Station Ahead

Step 2a: Move Forward

Step 2b: Turn Right

Step 3: If Wall Ahead

Step 3a: Stop

Step 4: Repeat From Step 1

Which two of the steps in the proposed algorithm must be swapped for the robot to successfully find its charging station without running into the wall?

1

2b

3a

4

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

While running for president, Barack Obama was interviewed by Google’s chairman Eric Schmidt. Schmidt asked Obama, “What is the most efficient way to sort a million 32-bit integers?” Obama’s response was, “I think the bubble sort would be the wrong way to go.” Which of these sorts would be a better choice?

Binary Sort

Insertion Sort

Quick Sort

Selection Sort

6.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

After discussing strategies for searching an unordered list, your class broke up into groups to create posters to explain the linear search algorithm. One group made a flowchart. Another group listed the steps in pseudocode. Some posters also showed blocks-based code in Scratch or text-based code in JavaScript. The teacher determined that all posters correctly represented the linear search algorithm. Which of the posters list solutions that could be executed on a computer as written? (pick two)

Flowchart

Scratch

Pseudocode

Javascript

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Algorithms can be expressed in a number of languages, including

I. Text-based languages

II. Blocks-based languages

III. Natural languages such as English

IV. Flowcharts

V. Pseudocode

I and II only

I, II, and IV only

IV and V only

I, II, III, IV, and V

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?