Introduction to Computational Thinking in Python

  • Introduction
  • Search
  • 1. Using Jupyter Notebooks
    • 1.1 Introduction to Jupyter Notebooks
    • 1.2 Debugging Jupyter Notebooks
  • 2. Computers and Python
    • 2.1 Introduction to Python and the print Function
    • 2.2 Writing a Program
    • 2.3 Debugging Python Code
    • 2.4 File Types and Python
  • 3. Datatypes and Variables
    • 3.1 Data Types and Operations
    • 3.2 Variables
    • 3.3 Updating Variables' Values
    • 3.4 Casting
    • 3.5 Strings
  • 4. Functions
    • 4.1 The input Function
    • 4.2 Using Functions
    • 4.3 Built-in Functions
    • 4.4 Writing Functions
    • 4.5 Writing Functions with Parameters
    • 4.6 Writing a main Function
    • 4.7 Writing Functions with Returns
  • 5. Conditionals
    • 5.1 Logical Expressions
    • 5.2 if Statements
    • 5.3 if-else Statements
    • 5.4 if-elif Statements
    • 5.5 if-then-if vs. if-elif Statements
    • 5.6 not
  • 6. Iteration and Loops
    • 6.1 While Loops
    • 6.2 Common While Loops Patterns
    • 6.3 While Loops and the Accumulator Pattern
    • 6.4 Debugging While Loops
    • 6.5 Nested While Loops
  • 7. Lists
    • 7.1 Lists Basics
    • 7.2 Strings as Lists
    • 7.3 Strings, Lists, and Mutating
    • 7.4 Slicing
    • 7.5 Lists and Scope
    • 7.6 Lists and Built-in Functions
  • 8. For Loops
    • 8.1 For Loops Basics
    • 8.2 For Loops and the Accumulator Pattern
    • 8.3 Nested For Loops
  • 9. Modules
    • 9.1 Using Modules
    • 9.2 Using Custom Modules
    • 9.3 Writing Modules
    • 9.4 Example: Measuring Runtime
  • 10. File input/output
    • 10.1 File input/output basics
  • 11. matplotlib and Graphing
    • 11.1 Introduction to matplotlib
  • 12. Objects
    • 12.1 Using Objects (part 1)

Powered by Jupyter Book

On this page

〈 Example: Measuring Runtime File input/output basics 〉