Please enable JavaScript to use CodeHS

South Carolina Computer Programming 2 with Python

Python Control Structures

Students learn how to use booleans and logical operators with control structures to create more advanced programs in Python.

Lessons

2.1 Booleans

  • Booleans
  • Booleans Quiz
  • First Boolean
  • Do You Have a Cat?

2.2 Logical Operators

  • Logical Operators
  • Logical Operators Quiz
  • Light Switch
  • President
  • Wasting Time
  • +2 more

2.3 Comparison Operators

  • Comparison Operators
  • Comparison Operators Quiz
  • Voting Age
  • Grade Range
  • Rolling Dice
  • +1 more

2.4 If Statements

  • If Statements
  • If Statements Quiz
  • Negative Numbers
  • Great Names
  • Even and Odd
  • +4 more

2.5 Key Events

  • Key Events
  • Key Events Quiz
  • Keyboard Square
  • Growing Circle
  • Graphics Badge

2.6 For Loops in Python

  • Basic For Loop
  • For Loops Quiz
  • For Loop
  • Meme Text Generator
  • The Worm
  • +1 more

2.7 General For Loops

  • General For Loop
  • General For Loop Quiz
  • Countdown
  • Count By Twos
  • Count By Sevens
  • +1 more

2.8 For Loop Practice

  • For Loop Examples
  • For Loop Examples Quiz
  • For Loop Sum
  • Better Sum
  • Factorial
  • +1 more

2.9 Random Numbers

  • Random Numbers
  • Random Numbers Quiz
  • Rolling a Die
  • Flipping a Coin
  • Lots of Dice
  • +2 more

2.10 While Loops

  • While Loops
  • While Loops Quiz
  • While Loop Countdown
  • Inventory
  • Fibonacci

2.11 Loop and a Half

  • Loop and a Half
  • Loop and a Half Quiz
  • Adding Up Numbers
  • Snake Eyes
  • Better Password Prompt
  • +1 more

2.12 Challenge: Guessing Game

  • Guessing Game
  • Guessing Game Reflection

2.13 Python Control Structures Quiz

  • Python Control Structures Quiz