• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 43 pages
Exam (elaborations)

Code HS Answers: Lessons 1-20 100% pass Newest

Document preview thumbnail
Preview 4 out of 43 pages

Code HS Answers: Lessons 1-20 100% pass NewestCode HS Answers: Lessons 1-20 100% pass NewestCode HS Answers: Lessons 1-20 100% pass NewestCode HS Answers: Lessons 1-20 100% pass NewestCode HS Answers: Lessons 1-20 100% pass Newest

Content preview

Code HS Answers: Lessons 1-20 100% pass
Newest

Which is a valid Karel command?
II! II! II! II! II!




move; II!




MOVE

move(); II!




move() - Correct Answers move(); II! II! II! II! II!




II! What is a street in a Karel world? - Correct Answers Row
II! II! II! II! II! II! II! II! II! II! II! II!




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




II! If Karel starts at Street 1 and Avenue 3 facing East, what street (row) and avenue (column) will Karel be on
II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II!




II! after this code runs?
II! II! II!




move();

move();

move();

turnLeft();

move(); - Correct Answers Street 2 Avenue 6
II! II! II! II! II! II! II! II!




II! If Karel is facing North and the code
II! II! II! II! II! II! II! II!




turnLeft();

turnLeft();

runs; which direction is Karel facing now? - Correct Answers South
II! II! II! II! II! II! II! II! II! II! II!




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

,II! What can be used to teach Karel to turn right? - Correct Answers functions
II! II! II! II! II! II! II! II! II! II! II! II! II! II!




II! Which function will teach Karel how to spin in a circle one time?
II! II! II! II! II! II! II! II! II! II! II! II!




function spin() { II! II!




II! turnRight();

}

function spin() { II! II!




II! turnLeft();

II! turnLeft();

II! turnLeft();

II! turnLeft();

}

function spin() { II! II!




II! turnLeft();

II! turnLeft();

}

function spin() { II! II!




II! move();

II! move();

II! move();

II! move();

} - Correct Answers function spin() {
II! II! II! II! II! II! II!




II! turnLeft();

II! turnLeft();

II! turnLeft();

II! turnLeft();

}

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




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




II! Why do we use functions in programming? - Correct Answers Break down our program into smaller parts
II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II!




Avoid repeating code II! II!




Make our program more readable
II! II! II! II!




II! What is a top down design? - Correct Answers Top down design is a way of designing your program by
II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II!




II! starting with the biggest problem and breaking it down into smaller and smaller pieces that are easier to
II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II!




II! solve.



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




II! doing



II! What commands does SuperKarel know that regular Karel does not? - Correct Answers turnAround();
II! II! II! II! II! II! II! II! II! II! II! II! II! II!




II! and turnRight();
II!




II! Why should a programmer indent their code? - Correct Answers Helps show the structure of the code
II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II! II!




Easier for other people to understand
II! II! II! II! II!




Indenting is a key part of good programming styleII! II! II! II! II! II! II! II!




II! 2.4.7 Building a Shelter Code - Correct Answers turnLeft();
II! II! II! II! II! II! II! II! II!




makeSide();

function turnRight(){ II!




II! turnLeft();

II! turnLeft();

II! turnLeft();
II!




}

turnRight();

, makeSide();



function makeSide(){
II!




II! move();

II! putBall();

II! move();

II! putBall();

II! move();

II! putBall();

}



goHome();

function goHome(){
II!




II! turnRight();

II! move();

II! putBall();

II! move();

II! putBall();

II! move();

II! putBall();

II! turnLeft();

II! turnLeft();

II! turnLeft();

II! move();

II! move();

II! move();

II! turnLeft();

II! turnLeft();

}

Document information

Uploaded on
February 12, 2025
Number of pages
43
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$8.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
STUVEX
3.8
(123)
Sold
834
Followers
314
Items
16233
Last sold
2 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions