Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
26 Cards in this Set
- Front
- Back
lowerCamelCase |
ex. function startWorld |
|
world |
karel's world |
|
command |
instruction for karel |
|
Define a function |
creation of a new command |
|
call a function |
computer runs command created from function |
|
Curly bracket |
{} |
|
Indentation |
helps organize code |
|
top down design |
method of breaking down code |
|
programming style |
way code s written; if it works |
|
loop |
code to repeat codes |
|
for loop |
repeat of code x amount of times |
|
control structure |
allows change of the flow of code |
|
parantheses |
() |
|
condition |
code for an if statement or while-loop |
|
if statement |
question that program only runs if true |
|
if else statement |
control structure that does one section of code or another depending on a test |
|
while loop |
repeats code as long as it is true |
|
break down (decompose) |
code is splitting into more functions |
|
read like a story |
makes code is easy to follow |
|
comment |
explanation of code |
|
decomposition |
breaking down a program into smaller parts |
|
fencepost problem |
using a while loop and forget an action at the beginning or end |
|
Commands |
move(); turnLeft(); putBall(); takeBall(); wrong: putball(); PutBall(); putBAll(); putBall; |
|
functions |
function start(){ } function buildTower(){ } wrong: Function buildTower(){ } function BuildTower(){ } function buildTower{ } |
|
loops |
for(var i=0; i<2; i++){ } if(){ } if(){ }else{ } } wrong: If(){ } While(){ } |
|
loop Ex. |
move(); move(); for(var i =0;I<2;i++){ move(); } while(frontIsClear){ move(); } if(frontIsClear){ move(); }else{ turnAround(); } |