Image

Adventures in Raspberry Pi “Adventure 4”

turtle-graphics

This adventure is titled “Programming Shapes with Turtle Graphics”. Those of you that grew up in the 80’s will probably remember this as “Logo“. I have fond memories of using Logo in my middle school computer lab. The one piece that most of us remember was the cursor that was shaped like a little turtle. I would spend hours trying to get my designs just right. I learned a lot, with this programming language.

It is no surprise that this type of programming has found its way into many modern programming platforms. This chapter builds on what you learned in the previous chapter Adventures in Raspberry Pi “Adventure 3” with Scratch. Scratch has all of the commands needed to make Turtle Graphics. You can even change your sprite to be a little turtle if you wanted.

scratch

You start off by making some simple shapes beginning with a straight line. Then move onto making a pentagon shape. This introduces variables and loops to create the shape with fewer commands. You then get to start changing the size and color of the lines that are created.

python-logo

The lessons covered in Scratch are then replicated in Python. This is the first time Python is introduced in the book. Python introduces the typed code, line by line, to replicate each block that was used in Scratch. A very important lesson is learned through this process, coding has to be precise. A simple typo, Case size, Indent, or Punctuation error will result in the code erroring out. This is known as a bug in your code.

A very important lesson is learned through this process, coding has to be precise. A simple typo, Case size, Indent, or Punctuation error will result in the code erroring out. This is known as a bug in your code. Finding bugs or Debugging your code becomes a skill in and of itself. Your eye learns to scan the file quickly though.

This chapter is a great way to lead students from the block-based coding in Scratch to the typed code in Python. You get a solid understanding of the syntax through this chapter that will be a benefit to students in the long run. At the end of this chapter, you are given a link to the Turtle Graphics documentation at Python.org. There is a lot available in this documentation, that could take students beyond what is covered in the book.

The next chapter is Titled “Programming with Python”. I suspect that this chapter will build upon what we have learned so far. I have learned a lot already, and can’t wait to continue with these adventures.

This is the 4th installment of the Adventures in Raspberry Pi book review. Use these links to check out my previous posts – Adventures In Raspberry PiAdventures in Raspberry Pi “Adventure 2”, and Adventures in Raspberry Pi “Adventure 3”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s