What does it take to master the basics of Python?
Write Python programs with up to 100 lines.
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 |
- 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
- use the arithmetical operators (
+ - * / ** // %) - distinguish integer and float numbers
- convert integers, floats and strings
- use functions from the
mathmodule - look up functions from the
mathmodule - calculate absolute and rounded values
- output numbers using format strings
- recognize and fix runtime Exceptions
- 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
- 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
- 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)
- 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
- 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
- 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