Please enable JavaScript to use CodeHS

Alabama Digital Literacy and Computer Science 9-12

Python Fundamentals

Students learn the basics of programming by writing programs that interact with users through the keyboard.

Lessons

5.1 How to Think Like a Programmer

  • How to Think Like a Programmer
  • Problem Decomposition #1 - Meal Planning
  • Problem Decomposition #2 - Hobbies
  • Algorithms
  • Algorithm #1 - PB&J
  • +1 more

5.2 Printing in Python

  • Printing in Python
  • Printing in Python
  • Hello, world!
  • Printing Multiple Lines
  • Introduce Yourself
  • +2 more

5.3 Variables and Types

  • Variables and Types
  • Variables and Types
  • Variables in Action
  • Variable Types
  • Variable Naming
  • +3 more

5.4 User Input

  • User Input
  • User Input
  • Basic User Input
  • Type Conversion
  • Type Conversion, Part 2
  • +2 more

5.5 Mathematical Operators

  • Mathematical Operators
  • Mathematical Operators
  • Operators and Integers
  • Operator Precedence
  • Add Parentheses
  • +3 more

5.6 String Operators

  • String Operators
  • String Operators
  • Operators and Strings
  • Fix This Program
  • Team Sizes
  • +4 more

5.7 Comments

  • Comments
  • Comments
  • Commented Program
  • Trapezoid
  • Add Comments!

5.8 Refactoring For Readability

  • What is Refactoring?
  • Refactoring for Readability
  • Refactor This Program
  • Refactoring Reflection

5.9 Functions

  • Functions
  • Functions
  • Greeting
  • Extended Greeting
  • Weather

5.10 Functions and Parameters

  • Functions and Parameters
  • Functions and Parameters
  • Print a Value
  • Name and Age
  • Print Product
  • +3 more

5.11 Functions and Return Values

  • Functions and Return Values
  • Functions and Return Values
  • Return 10
  • Add One
  • Negate
  • +6 more

5.12 Levels of Abstraction

  • Levels of Abstraction
  • Abstraction Concepts Quiz
  • Functions as Abstraction
  • Design Before You Code
  • Refactor into Abstraction Layers

5.13 Testing Your Code

  • Testing Your Code
  • What Makes a Good Test Suite? Quiz
  • Testing Double
  • Roller Coaster Ride Tests
  • Debug with Tests
  • +2 more

5.14 Debugging Strategies

  • Debugging Strategies
  • Error Types Quiz
  • Exploration: Reading Errors
  • Fix the Functions
  • Debugging Reflection

5.15 Simulation

  • Simulation
  • Gravity Simulation
  • Conway's Game of Life
  • Simulating a Coin Flip
  • Wolf Sheep Predation Simulation
  • +1 more

5.16 Indexing and Slicing

  • Indexing
  • Indexing
  • Characters in a String
  • Initials
  • Slicing
  • +3 more

5.17 Basic Python and Console Interaction Quiz

  • Basic Python and Console Interaction Quiz
  • Basic Python and Console Interaction Badge

Courses that include this module