Which is a valid Karel command?
move;
MOVE
move();
move() move();
What is a street in a Karel world? Row
What is an avenue in a Karel world? 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();
mo...
Code HS Answers: Lessons 1-20
(2022/2023) Already Passed
Which is a valid Karel command?
move;
MOVE
move();
move() ✔✔move();
What is a street in a Karel world? ✔✔Row
What is an avenue in a Karel world? ✔✔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(); ✔✔Street 2 Avenue 6
If Karel is facing North and the code
turnLeft();
turnLeft();
runs; which direction is Karel facing now? ✔✔South
How many times should Karel turn left in order to turn right? ✔✔3
What can be used to teach Karel to turn right? ✔✔functions
Which function will teach Karel how to spin in a circle one time?
function spin() {
turnRight();
}
function spin() {
turnLeft();
turnLeft();
,turnLeft();
turnLeft();
}
function spin() {
turnLeft();
turnLeft();
}
function spin() {
move();
move();
move();
move();
} ✔✔function spin() {
turnLeft();
turnLeft();
turnLeft();
turnLeft();
}
, How many times should the start function be defined in a program? ✔✔1
How many times should the start function be called in a program? ✔✔0
Why do we use functions in programming? ✔✔Break down our program into smaller parts
Avoid repeating code
Make our program more readable
What is a top down design? ✔✔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 ✔✔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? ✔✔turnAround(); and
turnRight();
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller dennisgathiru. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $17.99. You're not tied to anything after your purchase.