Cheat sheet · Class 11 · CBSE · Science Computer Science
Flow of Control cheat sheet
The whole chapter on one page: key formulas, facts and the points to remember, for quick revision before a test.
CBSE Class 11 · Computer Science
Cheat sheet
Chapter 6Flow of Control
break leaves the loop; continue skips to the next iteration.
1. Selection
- if, if-else, if-elif-else.
- Indentation defines blocks (usually 4 spaces).
if marks >= 90: grade = 'A'
elif marks >= 75: grade = 'B'
else: grade = 'C'
2. Loops
- for i in range(start, stop, step) — stop is excluded.
- while condition: … — runs while True.
- else block on a loop runs if it ends without break.
range(5) → 0, 1, 2, 3, 4; range(10, 0, -2) → 10, 8, 6, 4, 2.
3. Jump Statements & Nesting
break
exit the innermost loop.
continue
skip the rest of this iteration.
pass
placeholder that does nothing.
Nested loops: the inner loop completes fully for each outer iteration (patterns, tables).
4. Key Points
- Infinite loop: condition never becomes False.
- Use while when the count is unknown.
- Indentation errors are syntax errors.
- range() makes integers only.
Remember: if-elif-else | range() rules | break, continue, pass
Flow of Control: questions and notes
More Class 11 · CBSE · Science Computer Science cheat sheets
Practise Flow of Control
Sign up free to practise the full chapter. Questions you get wrong come back until you've mastered them.
Start practising freeFree to start · No credit card needed