Code HS Karel Intro to Programming Practice Test fully solved 2023
Code HS Karel Intro to Programming Practice Test fully solved 2023Which 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 and other new commands? 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 / written 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(); What is the best way for Karel to move 10 times? for (var i = 0; i < 10; i++) { move(); } Why do we use if statements in Karel? To do something only if a co
Written for
- Institution
- Code HS
- Course
- Code HS
Document information
- Uploaded on
- March 17, 2023
- Number of pages
- 4
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
code hs karel intro to programming practice test fully solved 2023
-
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