/pycourse

Python Course

Primary LanguageJupyter Notebook

Learn Python in a Fun Way with Turtle Graphics and Fractals

Binder

This course is also available in Russian. However, Russian translation is not completed at the moment, so use it at your own risk.

Welcome to an Introduction to Python with Turtle Graphics and Fractals! In this course, we will introduce you to main concepts of Computer Programming using one of the most popular programming languages today - Python. You will also learn to make computer draw nice pictures - like the one below:

Computer programming is a way to tell computer to do things. For example, you can ask computer to calculate the product of all number from 1 to 10. To do that, you need to express your instructions in a clear way, and in a language understandable by a computer. We will learn the language called Python, but there are also other popular languages, such as C#, C++ or Javascript.

Many of the samples in this course will be using so-called Turtle graphics. The main idea is that we can give commands to a simple "virtual robot" called turtle, asking it to move forward, or turn left. By doing so, we can draw different things, and immediately see the results of our commands. It is a fun way to learn programming, because you will produce pictures, and not just boring numbers. But do not worry, we will work with numbers as well!

In this course we will use a technology called Jupyter Notebooks. Notebooks are documents that combine normal text with some computer code that you can execute. While you can read notebooks here by following the links, to execute them you need some programming environment. There are several ways you can execute notebooks and follow this course:

  • Install Python and Jupyter on your computer. It is a good idea to do so if you are serious about learning programming. I typically recommend to start with miniconda, but you can also install Anaconda, or official Python distribution
  • Use GitHub Codespaces. Currently you need to apply for early access to this technology, which may take time.
  • Use Binder by clicking on the button at the top of this page. Keep in mind that when using Binder all changes you make to notebooks are not saved by default, and the environment tends to expire after some time - thus it is very easy to lose your work.

Content of the Course

Unit Link
Introduction to Programming Binder
Functions Binder
Conditional Operators Binder
Loops Binder
Nested Loops Binder
While Loop Binder
Recursion and Beauty of Programming Binder

Intro Video