One of these functions is named correctly: StopAtWall() and buildTower()
What is buildTower?
These are two examples of conditional statements.
What are frontIsClear() frontIsBlocked() leftIsClear() leftIsBlocked() rightIsClear() rightIsBlocked() facingNorth() notFacingNorth() facingSouth() notFacingSouth() facingEast() notFacingEast() facingWest() notFacingWest() ballsPresent() noBallsPresent()
for (var i = 0; i < COUNT; i++) { is an example of this.
What is a For Loop?
// describes this type of comment in your code.
What is a single line comment?
This is like a list of actions that we want Karel to perform.
What is a program?
This is like teaching karel a new word.
What is a FUNCTION?
These two statements ask questions about the world.
What are if statements and if-else statements?
We could use this to write the code
move(); move(); move(); move(); move();
What is a for loop?
/* describes your code * to someone who is reading it. */
What is a multi-line comment?
These are the four common commands that Karel knows?
What are takeBall(); turnLeft(); move(); putBall(); ?
All your code goes INSIDE this function.
What is the START function?
This code will run if the condition is true
What is an IF statement?
for (var i = 0; i < 65; i++) {
move();
In this example Karel will move this many times.
What is 65?
This is used in order to help others to understand our code in plain English.
What is a comment?
This is an instruction for an action that Karel can do.
What is a command ?
These two functions are what Karel can do when she is Super Karel.
What are turnRight and turnAround?
This code that will run if condition is not true
What is an ELSE statment?
This code that will run while the CONDITION is true. Once the CONDITION is no longer true, it will stop.
What is a While (loop) statement?
These are the symbols we use to make "boxes" after a control structure.
What are curly braces { } ?
Every command must end in this.
What is ();
move(); pickUpThreeBalls(); move(); is an example of ____ as compared to defining a function.
What is CALLING a function?
These statements repeat patterns of code.
What are for loops and while loops?
The difference between a for Loop and a while Loop
What is a fixed number in the loop versus when we don't know how many times to repeat a command.
This is when and why we indent code.
We indent code whenever we enter a new "box" after a command structure. We indent code to make our program more readable / because our program won't work if not indented correctly.
When you write your program, consider the big picture, then you want to break down the problem into smaller chunks. Keep breaking down each subproblem until you have defined definite tasks that need to be accomplished. This is an example of what?
What is Top-down Design and Decomposition?