Programming > QUESTIONS & ANSWERS > Code HS Answers: Lessons 1-20 Complete Test Answered Correctly (All)

Code HS Answers: Lessons 1-20 Complete Test Answered Correctly

Document Content and Description Below

Code HS Answers: Lessons 1-20 Complete Test Answered Correctly. 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(); Why should a programmer indent their code? ✔✔ 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 ✔✔ 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 ✔✔ function start(){ move(); makePancakes(); move(); move(); makePancakes(); move(); move(); makePancakes(); move(); } function makePancakes(){ putBall(); putBall(); putBall(); } [Show More]

Last updated: 1 year ago

Preview 1 out of 28 pages

Add to cart

Instant download

We Accept:

We Accept
document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Add to cart

Instant download

We Accept:

We Accept

Reviews( 0 )

$9.00

Add to cart

We Accept:

We Accept

Instant download

Can't find what you want? Try our AI powered Search

OR

REQUEST DOCUMENT
66
0

Document information


Connected school, study & course


About the document


Uploaded On

Jan 07, 2023

Number of pages

28

Written in

Seller


seller-icon
Crescent

Member since 1 year

8 Documents Sold


Additional information

This document has been written for:

Uploaded

Jan 07, 2023

Downloads

 0

Views

 66

Document Keyword Tags

What is Browsegrades

In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·