Unit 2: Python Turtle Graphics
In Unit 1: Starting with Python, we introduced IDLE and Python Shell. You learned that Python Shell, among other things, can be used as a powerful calculator which can store intermediate results for later use in variables. You also wrote your very first Python program called “Hello”.
In this unit, we’ll continue exploring the Python language and basic programming concepts. We’ll introduce a popular Python module called Turtle – an interactive drawing module which allows you to draw intricate shapes by commanding a virtual turtle. You can issue commands like “move 50 steps” or “turn 90 degrees” and watch the turtle move around its window. And as the turtle moves, it draws a line in the Turtle window.
In order to draw more complicated shapes, we will introduce a new type of Python statement – the for-statement. This statement, sometimes called the for-loop or for-loop statement, runs the same set of instructions repeatedly, in a loop. In this unit, we will use for-loops to create beautiful drawings. And in Unit 4: Python Lists and Loops, we will explore the nuances and intricacies of for-loops and use them to solve real-life problems.
As was the case with Unit 1: Starting with Python, this unit will also have lots of challenging exercises and a short quiz with answers and solutions for all of them. We will conclude the unit with extras – two optional lessons that provide more detail on the learned topics.
We really hope that you showed your first program to your friends or parents and had them interact with it! In this unit, the programs will get even more impressive so don’t forget to share your accomplishments!
And here is a little taste of what’s coming in this unit – with just a few lines of code, you’ll be able to draw beautiful pictures like this 72-point red-and-blue star.[prev-next-ad1 prev=”https://codewithsara.com/python-with-sara/python-101/u1-starting-with-python/u1e2-python-concepts/” next=”https://codewithsara.com/python-with-sara/python-101/u2-python-turtle-graphics/u2l1-introducing-turtle/”]