Skip to content

Latest commit

 

History

History
115 lines (90 loc) · 3.18 KB

File metadata and controls

115 lines (90 loc) · 3.18 KB

Learning Goals

What does it take to master the basics of Python?

Main Goal

Write Python programs with up to 100 lines.

Key skills

Achieving this goal includes six skills (or competencies as pro didacticians call them):

area description
applications things you can get done
syntax grammar rules, keywords and special characters
functionality Python data types, functions and language constructs
elementary patterns useful combinations of commands
debugging techniques to discover and fix broken code
tools helpers that make programming easier

Goals per lesson

1.1 First Steps

  • install Anaconda
  • write a Hello World program
  • execute instructions in Spyder
  • use the code/debug cycle
  • store strings in variables
  • use the print() function
  • use the input() function
  • fix SyntaxErrors

1.2 Arithmetics

  • use the arithmetical operators (+ - * / ** // %)
  • distinguish integer and float numbers
  • convert integers, floats and strings
  • use functions from the math module
  • look up functions from the math module
  • calculate absolute and rounded values
  • output numbers using format strings
  • recognize and fix runtime Exceptions

1.3 Plotting

  • draw a bar plot with matplotlib
  • distinguish singular and composite data types
  • store data in a list
  • examine the length of a list
  • inspect data types
  • create data ranges with range()
  • execute code examples from the matplotlib gallery
  • recognize and fix bugs resulting from invalid lists
  • the switch it off and on strategy

1.4 Iteration

  • iterate over lists and ranges using a for loop
  • indent code blocks
  • calculate a list of function values
  • implement a program based on a flowchart
  • plot a parabola
  • comment your code
  • add diagnostic print statements while debugging
  • recognize and fix semantic errors
  • describe what impostor syndrome is and how to deal with it

1.5 Aggregation

  • open a text file for reading
  • collect data from a file in a list
  • calculate a sum from a list
  • calculate the mean from a list
  • distinguish absolute and relative paths
  • debug FileNotFoundErrors
  • read and aggregate a single-column text file
  • find functions for calculating descriptive statistics (min, max, median, stdev)

1.6 Conditionals

  • filter lines matching a condition from a data file
  • change the contents of a list
  • write if statements
  • sort and slice lists
  • apply comparison operators and boolean logic
  • use string methods
  • read a file with two columns
  • write a text file
  • define the input, processing and output parts of a program

1.7 Conditional Loops

  • write a number guessing game
  • create random numbers
  • use while loops to manage events
  • describe a program as input, processing and output
  • create sample output to guide writing of a program
  • debug endless loops
  • trace the lifetime of strategies
  • take breaks to solve difficult bugs

1.8 Dictionaries

  • count words using a dictionary
  • distinguish mutable and immutable data types
  • convert a dictionary to a list
  • convert a list to a dictionary
  • find most frequent words
  • execute code partially and inspect the result
  • read code to find logical errors
  • the rubber-duck test