Flow of Control - CBSE Class 11 Computer Science Notes, Diagrams and Solved Questions

Make Python programs decide and repeat: indentation and blocks, if, if-else and if-elif-else, for loops with range(), while loops, break and continue, nested loops, and classic programs for patterns, series sums and factorials.

In this chapter

  • Sequential, conditional and iterative flow, and indentation
  • if and if-else
  • if-elif-else chains and why order matters
  • for loops with an interactive range() lab
  • while loops, with a dry run of reversing a number
  • break and continue
  • Nested loops, patterns, series sums and factorial