If statements DRILL

If statements DRILL

8th Grade

5 Qs

quiz-placeholder

Similar activities

21 Things Basics

21 Things Basics

7th - 8th Grade

10 Qs

Паскаль. Основные команды

Паскаль. Основные команды

8th - 11th Grade

10 Qs

Coding helps to Understand

Coding helps to Understand

6th - 10th Grade

10 Qs

C# lesson10

C# lesson10

1st - 10th Grade

10 Qs

Interpret Technical Drawings

Interpret Technical Drawings

8th - 10th Grade

10 Qs

All Fun and Games - E-saftey and gaming

All Fun and Games - E-saftey and gaming

6th - 8th Grade

10 Qs

Year 8 - Progress Check 1 (Python Turtle Shapes)

Year 8 - Progress Check 1 (Python Turtle Shapes)

8th - 9th Grade

10 Qs

Social media influencers

Social media influencers

6th - 12th Grade

10 Qs

If statements DRILL

If statements DRILL

Assessment

Quiz

Computers

8th Grade

Practice Problem

Easy

Created by

Jonathan Smith

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

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

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of using if statements in Karel's programming?

To make Karel move faster

To allow Karel to make decisions based on conditions

To collect more tennis balls

To create a maze

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If Karel encounters a wall, which of the following code snippets correctly uses an if statement to respond?

`if(frontIsBlocked()) {turnLeft();}`

`if(turnLeft()) {move();}`

`if(move()) {frontIsClear();}`

`if(ballsPresent()) {move();}`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following conditions can be used to check if Karel is facing north?

`if(facingWest()) {move();}`

`if(facingSouth()) {turnRight();}`

`if(facingEast()) {turnLeft();}`

`if(facingNorth()) {move();}`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if Karel executes a move command when the front is blocked?

Karel will move through the wall

Karel will crash and stop

Karel will pick up a ball

Karel will turn left

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can Karel check if there are no tennis balls present on the current corner?

`if(frontIsBlocked()) {move();}`

`if(ballsPresent()) {turnLeft();}`

`if(noBallsPresent()) {move();}`

`if(turnLeft()) {move();}`

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?