• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 28 páginas
Examen

Code Hs Answers: Lessons 1-20

Document preview thumbnail
Vista previa 3 fuera de 28 páginas

CODE HS ANSWERS: LESSONS 1-20

Vista previa del contenido

CODE HS ANSWERS: LESSONS 1-20
Which is a valid Karel command?
move;
MOVE
move();
move() - Answers- move();

What is a street in a Karel world? - Answers- Row

What is an avenue in a Karel world? - Answers- Column

If Karel starts at Street 1 and Avenue 3 facing East, what street (row) and avenue
(column) will Karel be on after this code runs?
move();
move();
move();
turnLeft();
move(); - Answers- Street 2 Avenue 6

If Karel is facing North and the code
turnLeft();
turnLeft();
runs; which direction is Karel facing now? - Answers- South

How many times should Karel turn left in order to turn right? - Answers- 3

What can be used to teach Karel to turn right? - Answers- functions

How many times should the start function be defined in a program? - Answers- 1

How many times should the start function be called in a program? - Answers- 0

Why do we use functions in programming? - Answers- Break down our program into
smaller parts
Avoid repeating code
Make our program more readable

What is a top down design? - Answers- Top down design is a way of designing your
program by starting with the biggest problem and breaking it down into smaller and
smaller pieces that are easier to solve.

What is a code comment - Answers- A way to give notes to the reader to explain what
your code is doing

,What commands does SuperKarel know that regular Karel does not? - Answers-
turnAround(); and turnRight();

Why should a programmer indent their code? - Answers- Helps show the structure of
the code
Easier for other people to understand
Indenting is a key part of good programming style

2.4.7 Building a Shelter Code - Answers- turnLeft();
makeSide();
function turnRight(){
turnLeft();
turnLeft();
turnLeft();

}
turnRight();
makeSide();

function makeSide(){
move();
putBall();
move();
putBall();
move();
putBall();
}

goHome();
function goHome(){
turnRight();
move();
putBall();
move();
putBall();
move();
putBall();
turnLeft();
turnLeft();
turnLeft();
move();
move();
move();
turnLeft();
turnLeft();
}

, 2.5.4: Pancakes with Start - Answers- function start(){
move();
makePancakes();
move();
move();
makePancakes();
move();
move();
makePancakes();
move();
}
function makePancakes(){
putBall();
putBall();
putBall();
}

2.6.4: The Two Towers - Answers- function start(){

move();
turnLeft();
makeTower();
move();
turnRight();
move();
move();
turnRight();
move();
makeTower();
turnLeft();
turnLeft();
move();
move();
move();
turnRight();

}

function makeTower(){
putBall();
move();
putBall();
move();
putBall();
}

Información del documento

Subido en
28 de octubre de 2024
Número de páginas
28
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$13.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
GEEKA
3.8
(376)
Vendido
2221
Seguidores
1450
Artículos
62698
Última venta
1 día hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes