Search Header Logo

If statements

Authored by Jonathan Smith

Computers

6th - 8th Grade

Used 2+ times

If statements
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a Conditional Statement in programming?

A statement that executes a block of code only if a specified condition is true.

A statement that repeats a block of code a certain number of times.

A statement that defines a variable or a function.

A statement that ends the execution of a function.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Decomposition in programming is the process of breaking down a complex problem into smaller, more manageable parts. Which of the following best describes this concept?

Combining multiple tasks into one large task

Breaking down a complex problem into smaller parts

Ignoring the problem altogether

Solving the problem without any planning

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which conditional statement should be used for this situation:


If there is a ball present, Karel should take it. If there is no ball present, Karel should turn around.

if

if

if

if

else

none of these

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which conditional statement should be used for this situation:


If there is a ball present, Karel should take it. If the front is clear, Karel should move forward.

if

if

if

if

else

none of these

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which conditional statement should be used for this situation:


If there is a ball, Karel should take it. Then Karel should move forward.

if

if

if

if

else

none of these

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which conditional statement should be used for this situation:


If the front is clear, Karel should move. Otherwise, Karel should turn around.

if

if

if

if

else

none of these

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which conditional statement should be used for this situation:


Karel should drop a ball and then move forward until she reaches the end of the row.

if

if

if

if

else

none of these

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?