
Code.org - Loops, Functions, Conditionals
Authored by Beth Osten
Computers
7th - 8th Grade
Used 119+ times

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 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
Can you create a new function to make this code more efficient?
3.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
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
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
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
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
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?