What is the difference between a for loop and a while loop
A for loop repeats a fixed number of times
A while loop repeats as long as a condition is true
What is it called when you make a mistake in your program?
A bug
What are the four basic commands Karel knows?
turn_left()
put_ball()
take_ball()
Which statement best describes top-down design in programming?
A) Starting with small details and building up to the main problem
B) Starting with the main problem and breaking it down into smaller components
C) Writing code without any planning
D)Only focusing on the user interface
B) Starting with the main problem and breaking it down into smaller components
What can be used to help make your code more understandable to outside programmers
Comments
What control structures require conditions before Karel can do anything?
While loops and if statements
What error appears if Karel code starts to run before stopping suddenly?
Runtime Error
What is the difference between streets and avenues in Karel?
Streets ||
Avenue =
What is the programming principle that breaks down complex problems into smaller, manageable parts
Decomposition
When using top-down design, what should you do first?
A) function myFunction():
B)def calculate_sum():
C) function calculate_sum():
D) def calculateSum():
B) def calculate_sum():
What control structure do you use if Karel needs to decide between two possible actions
If/Else statement
Instead of jumping a hurdle, Karel moves up the grid and crashes into a wall. What type of error is this and what is the first thing I check for small errors?
Logic error.
Jump_hurdle function
What is the difference between SuperKarel and UltraKarel
Super Karel can turn_right or turn_around
UltraKarel can paint
When using top-down design, what should you do first?
Define the main problem
What type of code helps code reusability
Functions
What is the most important variable in a for loop?
"i" for iteration
What problem occurs when a loop ends but needs to repeat one more time to successfully complete the program?
Fencepost problem
What part of Code HS provides instructions on how to use its API?
DOCS tab
In function decomposition, what is a sequence of programming instructions that perform a specific task
A procedure
In Python, what is the proper way to write a single-line comment?
#This is a comment
OR
"
this is a comment
"
What 3 building blocks make up an algorithim?
Sequencing, Iteration and Selection
In a world of eight streets and avenues, Karel is in street 1, avenue 2 and is given the following code:
while front_is_clear():
//put_ball()
Where will Karel end up?
Creates an infinite loop so Karel crashes
What simplifies complex programming tasks by providing sets of clearly defined methods of communication among various computing components?
API (Application Programming Interface)
A team is designing a school scheduling system. They divide the project into the following parts:
Which computational thinking practice is primarily being used?
Decomposition
What programming principle hides unnecessary details while showing important information?
Abstraction