TranslateProject/sources/tech/20210612 How I teach Python on the Raspberry Pi 400 at the public library.md
DarkSun 78af80ca6b 选题[tech]: 20210612 How I teach Python on the Raspberry Pi 400 at the public library
sources/tech/20210612 How I teach Python on the Raspberry Pi 400 at the public library.md
2021-06-13 05:03:08 +08:00

5.9 KiB

How I teach Python on the Raspberry Pi 400 at the public library

After a long year of putting plans on hold, declining COVID case numbers are bringing back community-based programming courses. Women programming

After a long and tough year, I've been looking forward to once again sharing my love of Python and open source software with other people, especially middle and high school students. Before the pandemic, I co-wrote a grant to teach Python programming to middle school students using Raspberry Pi computers. Like many other plans, COVID-19 put mine on hold for over a year. Fortunately, vaccines and the improved health in my state, New York, have changed the dynamic.

A couple of months ago, once I became fully vaccinated, I offered to self-fund a Raspberry Pi and Python programming course in our local public library system. The Chautauqua-Cattaraugus Library system accepted my proposal, and the co-central library in Olean, N.Y., offered to fund my program. The library purchased five Raspberry Pi 400 units, Micro-HDMI-to-VGA adapters, and inline power adapters, and the library system's IT department loaned us five VGA monitors.

With all our equipment needs met, we invited middle school students to enroll for four afternoons of learning and programming fun.

All the students were socially distanced, each with a new Pi 400 and VGA monitor at their desk. Our class was small, made up of a fourth-grade student and two sixth-grade students. None had a programming background, and their keyboarding skills were rough. However, their innate curiosity and enthusiasm carried the day.

Learning and iterating

We spent the first afternoon assembling the Pi 400s, connecting them to the library's wireless network, and installing the Mu Python editor, which we used for the class.

Raspberry Pi 400 equipment

(Don Watkins, CC BY-SA 4.0)

I followed this with a brief introduction to Raspberry Pi OS and how it differs from Windows and macOS computers and offered a brief tutorial on using the Mu editor.

Since we were meeting in a public library, I emphasized that the library has books covering the concepts and Python programming code used in the class, especially Teach Your Kids to Code by Dr. Bryson Payne and Python for Kids by Jason Briggs. I created daily handouts for the students to refer to alongside the instruction. I also used my own Raspberry PI 400 connected to a 32" LCD monitor to illustrate the code and programming results.

Raspberry Pi 400 setup

(Don Watkins, CC BY-SA 4.0)

I like to use the turtle module to introduce Python programming. It's always been well received, and the students love the graphics they can create while learning Python basics like variables, for loops, lists, and the importance of syntax.

I learn something new every time I teach, and this was no exception. I especially enjoy watching students iterate on my code examples—some are from books, and others are my own creations. The fourth-grader in our class took this example code and added two more colors and corresponding code to create a six-color spiral.

# multicolor spiral
import turtle as t
colors = ["red", "yellow", "blue", "green"]
for x in range(100):
    t.pencolor(colors[x%4])
    t.circle(x)
    t.left(91)

Spiral graphic created in Python

(Don Watkins, CC BY-SA 4.0)

At the end of the four-day course, each student received a Raspberry Pi 400 and a book explaining how to program their computer. They also got a list of free and open source software resources, a reading list of recommended books available in the library, and some open educational resources available on the web.

Open learning

Mark Van Doren said, "the art of teaching is the art of assisting discovery." I saw that play out in this classroom using open source tools. More students need opportunities like this to help them gain a quality education. The Raspberry Pi 400 is a great form factor for teaching and learning.

The Olean Library plans to offer another similar course later this year. I encourage you to share your love of free and open source software with your own communities.


via: https://opensource.com/article/21/6/teach-python-raspberry-pi

作者:Don Watkins 选题:lujun9972 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出