Search Header Logo

APCSP1

Authored by Thomas Burns

Computers

9th - 12th Grade

Used 1+ times

APCSP1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following is not a valid condition to go in a while loop for Karel?

facingNorth()

frontIsBlocked()

turnAround()

noBallsPresent()

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is one way to create an abstraction in Karel coding?

Use a while loop

Use a for loop

Create a function

Use an if statement

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Say you want to write a program that has Karel run to the other side of first street, jumping over all of the hurdles. Karel should only jump if there is a hurdle blocking the way. However, the hurdles can be in random locations. The world is fourteen avenues long. What is the best control structure to use?

If statement

While loop

Nested while loop

For loop

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Super Karel starts at Street 2, Avenue 1, facing North in a 5 x 5 world. What will happen after this code above runs?

Karel will end at Street 2 Avenue 3

Karel will end at Street 3 Avenue 2

A syntax error will occur

Karel will run into a wall

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following problem solving strategies breaks down different parts of a function into their own functions to make the code more readable?

Indenting code

Debugging code

Top Down Design

Loops

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

In the above code, what would be a good Postcondition to write?

Karel is in the same spot

Karel has moved up and over two spots and is facing South

Karel has moved up and over two spots and is facing East

Karel has moved up and over to spots to the right facing North

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

If you want to repeat something a fixed number of times, which of the following

would you use?

If statement

For loop

While loop

If/Else statement

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?