Python Exercises for Beginners

This is a tutorial for novice programmers. You are the learner I had in mind when writing this tutorial if:

  • you have worked a little with a different programming language like R, MATLAB or C.
  • you have no programming experience at all
  • you know Python well and would like to teach others

Pick an exercise and start programming!


First Steps

Chapter Difficulty
Installing Python
Python as a calculator
Hello World
Ada Lovelace
Rock-Paper-Scissors
Square Numbers
Slideshow
Recap

Data Structures

Chapter Difficulty
Strings
Lists
Dictionaries ⭐⭐
Working with tables ⭐⭐
Data Types overview

Program Structures

Chapter Difficulty
Repeating instructions
Conditional Loops
Writing your own functions ⭐⭐
Shortcuts ⭐⭐
Structuring programs ⭐⭐

Aggregation


Challenges

Challenge Difficulty
Christmas Tree
Pyramid
Fizz-Buzz-Test
Tic-Tac-Toe ⭐⭐
Checkerboard ⭐⭐

Text processing

Challenge Difficulty
Storing text
Palindrome ⭐⭐
Anagrams ⭐⭐
Roman Numbers ⭐⭐⭐
Encryption ⭐⭐⭐
Minesweeper ⭐⭐⭐

Math Problems

Challenge Difficulty
Factorials
Common Divisor
Fibonacci ⭐⭐
Multiplicative Digital Root ⭐⭐
Birthday Problem ⭐⭐

Graphics

Challenge Difficulty
Spiral
Postcard ⭐⭐
Recursive Graphics ⭐⭐⭐
Choropleth ⭐⭐⭐

Algorithms

Challenge Difficulty
Binary Search
Sorting Algorithms
Chained List ⭐⭐
Josephus' Problem ⭐⭐
Tree Traversal ⭐⭐
Graph Traversal ⭐⭐⭐
Magic Square ⭐⭐⭐
Traveling Salesman ⭐⭐⭐
King ⭐⭐⭐⭐
Backpack Problem ⭐⭐⭐⭐
Blockchain ⭐⭐⭐⭐

Web Development

Challenge Difficulty
Ping Pong ⭐⭐
Google Search ⭐⭐⭐
Download Web Pages ⭐⭐⭐
Blog ⭐⭐⭐⭐

Advanced Python

Challenge Difficulty
Tennis ⭐⭐
Decorator-Metaclass ⭐⭐⭐⭐⭐

Appendix


License

© 2015 Dr. Kristian Rother (krother@academis.eu)

with contributions by Allegra Via, Kaja Milanowska, Anna Philips, @ShalokShalom and @devSython.

Distributed under the conditions of the Creative Commons Attribution Share-alike License 4.0

Sources of this document can be found on https://github.com/krother/Python3_Basics_Tutorial

Acknowledgements

I would like to thank the following people for inspiring exchange on training and Python that this tutorial has benefited from: Pedro Fernandes, Tomasz Puton, E dward Jenkins, Bernard Szlachta, Robert Lehmann and Magdalena Rother

Dr. Kristian Rother

I am a professional Python trainer, developer and author based in Berlin. I believe everybody can learn programming.

Contact me via:
+49 176 3052 4691
krother@academis.eu

Feedback

Your tips helped me a lot with designing the workshop and then to make it run smoothly!

Joanna Kasprzak, UAM Poznan

See also