Search Header Logo

Code.org - Loops, Functions, Conditionals

Authored by Beth Osten

Computers

7th - 8th Grade

Used 119+ times

Code.org - Loops, Functions, Conditionals
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

Media Image

What is making this code inefficient?

A loop could have been used instead of a Pick Function.

The function is only called on once.

There are programming blocks that could have been added to a function.

There is code in your program where could have called on a function instead, saving blocks

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Can you create a new function to make this code more efficient?

Media Image
Media Image
Media Image

3.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Media Image

When this program is run, the last pumpkin is not harvested. Why? (17-6)

You should have added another Pick Path function.

You should have used an If Conditional instead of a Why Conditional for Pumpkins.

You should have moved the pick block after the forward block

Pumpkins should be picked before corn in the Pick function.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

This code looks like it should be a function instead of loops because...

there are too many things to pick

there are both right and left turns, making the pattern not perfect

the pumpkin isn't always at the corner

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

If there were more than one corn in a square, would this code work?

Yes, because it keeps on running until there is no path ahead

No, because and if block is only read once, and then you move forward.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Should this be a loop?

No, because there is no pattern.

Yes, because every middle square has honey or nectar.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

There is a zig-zag pattern at the beginning and the end of this puzzle. You should

Ignore it because only squares should be functions.

Create a zig zag function

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?