Quiz 4: Conditionals and while loops
Learning Goals
Students should be able to:
- Predict/trace the operation of nested and chained conditionals
- Reason about and predict the execution flow of code in the presence of conditional, assignment, and return statements
- Model the execution of code without running it on a computer
- Translate the behavior of code into its semantic meaning, and compare the semantics of multiple code snippets
- Write complex conditionals
- Solve problems using conditional statements
- Translate English problem descriptions into code
- Use print statements to illustrate the operation of a loop
- Use while loops to translate English descriptions of iteration into Python
- Explain the rules governing a while loop's execution in English
Solutions
After your quiz is graded by instructors, you will get an email from Gradescope. Solutions for individual quiz questions are provided in the Gradescope rubric.