Skip to content

Latest commit

 

History

History
173 lines (116 loc) · 3.75 KB

README_EN.md

File metadata and controls

173 lines (116 loc) · 3.75 KB

Python for Beginners

Outcome

After this course you will write simple programs in the Python programming language on your own and execute them.

Target Audience

People with little or no previous knowledge of programming who would like to use Python to automate repetitive tasks and work together with experienced developers more smoothly.

Prerequisites

none

Course Description

Everybody can program! The aim of this course is to introduce people with little or no previous experience in programming to the Python language. By solving many bite-size programming tasks, you will become familiar with new commands one after the other. In the end, you will achieve basic literacy in a programming language that you can apply yourself comfortably, or take the next learning steps on your own. This course does not spend much time on theory but is meant to keep you writing code most of the time.

Course Duration

28 hours

Course Outline

Day 1 Day 2 Day 3 Day 4
First Steps Functions Dictionaries Classes
Lists String Handling Data Structures Larger Programs
Reading and Writing Files Retrieving Web Pages Python Modules Development Tools
Programming Exercise Programming Exercise Programming Exercise Final Exercise

Day 1

Objective of the day: Turing-completeness

First Steps

  • the Python console
  • writing a program
  • variables
  • integers and floats
  • arithmetical operators
  • text output

Lists

  • iterable data in Python
  • indexing
  • slicing
  • list methods
  • for loops
  • decisions with if

Reading and Writing Files

  • reading text files
  • writing text files
  • type conversions
  • navigating directories

Programming Exercise: "Baby Names"

How frequent is your own given name? How has it developed over the past 100 years? Write a program that mines a dataset of baby names according to your query.

Day 2

Objective of the day: structure a program

Functions

  • built-in functions
  • calling functions
  • writing your own functions
  • parameters
  • return values
  • recursion
  • variable scope

String Handling

  • format strings
  • string methods
  • parsing text
  • Regular Expressions
  • Unicode

Retrieving Web Pages

  • the requests module
  • sending HTTP queries
  • filling web forms
  • parsing web pages

Programming Exercise: "Newsfeed"

What are the news? Write a program that retrieves news items from an agency, parses the data and displays the latest headlines.

Day 3

Objective of the day: Build a complex data structure

Dictionaries

  • looking up data
  • methods of dictionaries
  • tuples
  • hashing
  • counting elements
  • OrderedDict

Data Structures

  • composite data structures in Python
  • tables
  • trees
  • data modeling
  • how data structures make programming simpler

Modules

  • the package manager pip
  • frequently used Python modules
  • reading common data formats (CSV, Excel, XML)
  • interacting with the operating system
  • data analysis
  • data visualization
  • databases
  • web servers
  • writing your own modules

Programming Exercise: "Once upon a time.."

Sorcerers, genies and adventures. What are the "Arabian Nights" all about? Write a program that analyzes the text of an Arabian fairy tale and finds out frequently occuring themes.

Day 4

Objective of the Day: Whetting your appetite

Classes

  • classes and instances
  • attributes
  • methods
  • self
  • constructors
  • inheritance

Writing Larger Programs

  • modules and packages
  • the __main__ block
  • command-line arguments
  • introspektion

Development Tools

  • version control
  • automated tests
  • editors
  • virtualenv
  • pylint

Final Exercise

Repeat everything learned so far and answer open questions

Book: 'Think Python' by Allen B. Downey