New Version of Visual Intro to Python Released

We are pleased to announce that a new version of our popular self-paced course Visual Intro to Python was released today.

About the Course

Visual Intro to Python is an NCLab classic. This self-paced course is an excellent introduction to Python programming for middle school students. It teaches fundamental concepts including Python syntax and code formatting, loops, nested loops, variables, functions, Boolean logic, conditions, lists, and recursion while students are programming a robotic turtle. In contrast to other Python-Turtle-based courses which can be found online, the NCLab Turtle was implemented on top of a Python-based scripting CAD which allows students to extrude their drawings to 3D and print them on 3D printers. Furthermore, the NCLab Turtle has various sensors which make her an excellent medium for the implementation of a broad range of important robotics algorithms. For more information, visit the NCLab K-12 page.

New Content Added

The course was extended from three to four Units:

  • Unit 1: Learn Python syntax and code formatting. Write programs to draw various geometrical objects using for loops and nested loops.
  • Unit 2: Learn how to create and use variables, the difference between local and global variables, and how to define and use functions.
  • Unit 3: Learn Boolean logic and decision making. Work with Boolean values True and False, and with Boolean operators and, or, not.
  • Unit 4: Learn how to create empty and non-empty lists, how to perform important operations with lists, and how to use recursion.

Updated course syllabus can be found here.

Boolean Logic

The course was improved in so many ways that it is virtually impossible to list them all! All tutorials have been thoroughly revised and updated. The discussion of Boolean logic was expanded. Students now learn about the Boolean values True and False, comparison operators and other types of Boolean expressions which evaluate to True or False, about Boolean variables which store the True or False values, and about Boolean functions which return True or False. They learn how Booleans are used in conditional statements and in the while loop.

Python Lists

Also, the discussion of Python lists was expended significantly. Students now learn how to create empty and nonempty lists, how to add and insert items, how to pop (remove and return) and delete items, how to check for a given item in a list, how to count the occurrences of items in lists, use high-level list methods such as sort() and reverse(), as well as built-in list functions such as max(), min(), and sum(). Students use lists to solve a variety of robotic tasks such as detecting objects and storing their colors or positions in a list, etc.

Recursion

An entirely new topic, recursion, was added to Unit 4. Students learn how to recognize if a given task is suitable for recursion, how recursion works, the importance of the stopping condition, and what happens if recursion is not done right. Then they practice recursion by solving a variety of tasks ranging from calculating the factorial or recursively adding list items to the recursive line following and maze traversing algorithms. Finally, they write recursive programs to draw the Koch Snowflake fractal and the Fractal Tree.

Other Improvements

Finally, many new programming challenges were added, along with the corresponding Hints, Code Templates, and intelligent auto-grading feedback mechanisms. All exercises were revised also, and explanations for incorrect answers were improved.

More About the NCLab Python Turtle

The turtle has a pen that allows her to draw beautiful geometric patterns. These patterns can be extruded to 3D and exported for 3D printing and/or laser cutting.

The turtle also has a color sensor which allows her to detect and recognize colors on the ground beneath her. These sensors allow her to solve a variety of robotics tasks.

The turtle also has a LIDAR sensor. This sensor allows her to measure the distance to objects in front of her. Such sensors are used in autonomous cars. The LIDAR allows the turtle to avoid obstacles, navigate through unknown mazes, and perform a wide range of other robotics tasks.

As a final example, a great way to learn recursion is while drawing simple fractals!