Programming fundamentalsLesson 6 of 7 in the course Decisions
Python Nested Decisions: Branches, Indentation, and Execution Paths
5 flashcards · 5 quiz questions · 5 match pairs · 4 fill-in sentences · English
Lesson progress
0 / 5
Your progress is kept in this browser only.Sign up to save it
Summary
Nested decisions let a program make a second choice only after it has made an initial choice. This is useful when the rules for one decision depend on the result of another, such as choosing a menu before selecting a meal.
A nested decision is an if, elif, or else statement placed inside the body of another decision statement. The inner decision is reached only when execution enters the outer branch that contains it.
All flashcards
Quiz questions
Based on Introduction to Python Programming by Udayan Das, Aubrey Lawson, Chris Mayfield, Narges Norouzi (OpenStax), licensed CC BY 4.0. Adapted into a summary, flashcards and quizzes.
More in Programming fundamentals
All Programming fundamentals lessonsProgramming fundamentalsNested Loops: Iteration, Control, and Pattern Generation5 flashcards · 5 quiz questions · 4 gamesPlay free →Programming fundamentalsPython's math Module: Functions, Constants, and Formula Applications5 flashcards · 5 quiz questions · 4 gamesPlay free →Programming fundamentalsTracing Conditional and Function-Call Control Flow5 flashcards · 5 quiz questions · 4 gamesPlay free →Programming fundamentalsWhile Loops: Conditions, Counters, and Input-Controlled Repetition5 flashcards · 5 quiz questions · 4 gamesPlay free →Programming fundamentalsPython Function Parameters, Arguments, and Mutable Inputs5 flashcards · 4 quiz questions · 4 gamesPlay free →Programming fundamentalsPython Loop else: Normal Completion and break5 flashcards · 4 quiz questions · 4 gamesPlay free →