Please enable JavaScript to use CodeHS

AP Computer Science Principles in Roblox

User Interaction and Control Structures

In this module, students extend their understanding of programming in Lua to use control structures to create more complex programs. Students also learn about the Humanoid object and how to use Touched Events to make their programs interactive.

Lessons

2.1 Booleans and Conditionals

  • Booleans and Conditionals
  • Exploration: Day or Night?
  • Is it Poison?
  • What is a Humanoid?
  • Tutorial: Conditionals in Roblox - Potion Bottles
  • +2 more

2.2 Comparison and Logical Operators

  • Comparison Operators
  • Even or Odd
  • Logical Operators
  • Taking Turns
  • Explore: Boolean vs. Conditional
  • +2 more

2.3 Program Planning

  • Program Planning
  • Break it Down
  • Flow Chart → Pseudocode
  • Pseudocode → Program
  • Trivia Game Pseudocode
  • +1 more

2.4 Operators in Roblox

  • Powerups Guided Activity
  • Powerups Submission
  • It's a Race! Pseudocode
  • It's a Race! Activity
  • AP Practice: Comparison Operators
  • +1 more

2.5 Random Numbers

  • Random Numbers
  • Explore: Random ANSI Colors!
  • Random Moods
  • Boulder Escape in Roblox

2.6 While Loops

  • While Loops
  • While Loop Countdown
  • Exploration: Lucky Roller
  • Ghost Attack!
  • While Loops Obby Exploration
  • +2 more

2.7 For Loops

  • For Loops
  • Counting to 10
  • Exploration: For Loop Sum
  • Can You Pick the Lock?
  • For Loops Lava Room Exploration
  • +2 more

2.8 Break and Debounce

  • Break Statements
  • Guess the Password
  • Debouncing
  • Tag! You're It!
  • Break and Debounce

2.9 Algorithms

  • Algorithms
  • Comparing Algorithms
  • Comparing Algorithms Submission
  • Sorting Algorithms
  • Algorithm Efficiency
  • +1 more

2.10 User Interaction and Control Structures Quiz

  • User Interaction and Control Structures Quiz

Courses that include this module