WorksheetsCode.org Animation Games Conditionals
Total questions: 7
Worksheet time: 18mins
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
Can you create a new function to make this code more efficient?
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.
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
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.
Should this be a loop?
No, because there is no pattern.
Yes, because every middle square has honey or nectar.
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
