CQuiz on Control Structures
This is a short quiz about concepts related to control flow and control structuresControl Structures Quiz
- What are control structures? List two types of control structures and explain what they do. Give an example for each structure.
- What is lexical scoping and why is it important?
- What does it mean to 'mask' a variable inside of a nested block?
- Explain the difference between a loop and a conditional.
- What is an infinite loop? What strategies can help us prevent infinite loops?
- What is a breakpoint and what are they used for?
- Give an example of repeat times, while, and until.
- Give an example of an if statement.
- Describe a situation where a conditional statement would be useful.
- Describe a situation where a loop would be useful.
- What are libraries and how do they relate to use statements?
- Use the Quorum website's reference page to find the use statements for the following classes: 1) Drawable, 2) Microphone, and 3) File.
- Describe the concept of a package.
- Describe the concept of a nested loop and give an example in code.
- Describe how the concept of a conditional statement could be used for a program like a game (audio, visual, or multimedia) or robot?
Essay Questions
- Think about the common errors you have personally while using control structures. Write a short essay describing these errors. Do you personally have compiler errors? Runtime errors? Which has been more challenging to solve in your own programs?
- Write a short essay describing how the debugger can be used to find errors in control structures. In your essay, include the following concepts: 1) the error window, 2) breakpoints, and 3) step over.
Next Tutorial
In the next tutorial, we will discuss Actions, which describes how work actions in Quorum..