Introduction to Programming Quiz Sections Q&A
Introduction to Programming Quiz Sections Q&A Each of the following answer choices describes a basketball game. Which answer choice describes the game with the lowest level of abstraction? - ANSWER: First, Steph Curry flexed his left and right quad muscles at the exact same time, then he flexed each muscle in his fingers... How many times should Karel turn left in order to turn right? - ANSWER: 3 How many times should the start function be defined in a program? - ANSWER: 1 How many times should you call the start function when writing your program? - ANSWER: 0 If Karel is facing North and the code turnLeft(); turnLeft(); - ANSWER: South 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(); - ANSWER: Street 2 and Avenue 6 Karel needs to pick up a pile of tennis balls. Which of the following start functions solves the problem at the highest level of abstraction? - ANSWER: function start() { moveToPile(); takePile(); } What can be used to teach Karel to turn right? - ANSWER: Functions What commands does SuperKarel know that regular Karel does not? - ANSWER: turnAround() and turnRight() What do we use control structures for in JavaScript? - ANSWER: Control the flow of the program; how the commands execute
Document information
- Uploaded on
- June 21, 2024
- Number of pages
- 8
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers