1/10
This set of vocabulary flashcards covers the fundamental concepts of using selection statements (if-else) within while loops as presented in the computer science lecture.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
While Loop
A programming structure that repeats instructions while a condition is true.
If Statement
A programming structure that checks a condition and runs code if that condition is true.
Syntax of a While Loop
while condition: statement/s
Syntax of an If-Else Statement
if condition: statement/s else : statement/s
Indentation
A spacing format in Python that decides which statements belong inside the while, if, and else blocks.
Loop Variable Update
A required step where the counter or input must be changed (e.g., count=count+1) so the loop eventually stops.
Increment
The process of adding a value to a counter, such as count=count+1, to change the loop condition.
Selection
The process of decision making in code, such as choosing between "VIP Customer" and "Regular Customer" based on a condition.
Condition
A logical expression, such as count<=5 or count==3, that determines the flow of the program.
Else Action
The instruction that is executed when the initial "if" condition is false.
Infinite Loop
What happens in a program if the counter update is missing, causing the loop to potentially run forever.