https://opensource.com/article/21/6/teach-python-raspberry-pi Jump to navigation Opensource.com RedHat * Log in * Sign Up Search form Search [ ] [GO] Main menu * Articles + Containers + DevOps + Gaming + Government + Hardware o 3D printing o Arduino o Raspberry Pi + Kubernetes + Law o Licensing o Patents + Linux o Command line + OpenStack + Programming o Go o JavaScript o Python + Sysadmin * Resources + What is open source? o The open source way + Projects and applications + Organizations + Cloud technology o Ansible o Big data o Data science o Docker o Git o Internet of things o Java o Kubernetes o Linux containers o Microservices o OpenStack o Python # Python GUI frameworks # Python IDEs # Python template libraries # Python web scrapers o Software defined networking o Virtualization + Open source alternatives o Alternatives to Acrobat o Alternatives to AutoCAD o Alternatives to Dreamweaver o Alternatives to Gmail o Alternatives to MATLAB o Alternatives to Minecraft o Alternatives to Google Photos o Alternatives to Photoshop o Alternatives to Publisher o Alternatives to Skype o Alternatives to Slack o Alternatives to Trello o More... + Linux * Downloads + Cheat sheets o Ansible cheat sheet o Ansible k8s cheat sheet o AWK cheat sheet o Bash cheat sheet o Blender cheat sheet o C cheat sheet o Curl cheat sheet o Emacs cheat sheet o Firewall Cheat Sheet o FreeDOS cheat sheet o GIMP cheat sheet o GNOME cheat sheet o Groff macros cheat sheet o Go cheat sheet o i3 window manager cheat sheet o Inkscape Cheat Sheet o IRC cheat sheet o Java cheat sheet o Kubectl cheat sheet o Kubernetes cheat sheet o Linux common commands cheat sheet o Linux user permissions cheat sheet o Microservices cheat sheet o Networking cheat sheet o Pandoc cheat sheet o pip cheat sheet o Python 3.7 cheat sheet o Raspberry Pi cheat sheet o SELinux cheat sheet o SSH cheat sheet + Open Source Yearbook o 2015 o 2016 o 2017 o 2018 o 2019 Special Edition + Programming guides o 7 essential PyPI libraries o 6 surprising ways to use Jupyter + DevOps guides o Starting a DevOps transformation o Introduction to Small Scale Scrum o Getting started with DevSecOps o DevOps monitoring tools guide o DevOps hiring guide + Sysadmin guides o Ansible Automation for Sysadmins o Containers primer o Kubernetes for SREs and sysadmins + eBooks o Getting started with Kubernetes o Inter-process communication in Linux o 5 open source collaboration tools o 6 open source tools for staying organized o 7 open source desktop tools o A practical guide to home automation using open source tools o Kubernetes for SREs and sysadmins o Raspberry Pi: How to get started o Running Kubernetes on your Raspberry Pi * About + About Opensource.com o Welcome to the Opensource.com community o Meet the team o Create an account o Rules for comments and discussions o Correspondent Program o Frequently Asked Questions + Contribute to Opensource.com o Opensource.com style guide o Writing topics + Contact us * Open Organization + Get started + Book series o Field Guide o Leaders Manual o Guide to IT Culture Change o Guide for Educators o Workbook o Organize for Innovation + Resources o What is an open organization? o How open is your organization? o What is an open decision? * Log in * Sign Up * Twitter * Facebook * Feed Main menu * Articles + Containers + DevOps + Gaming + Government + Hardware o 3D printing o Arduino o Raspberry Pi + Kubernetes + Law + Linux o Command line + OpenStack + Programming o Go o JavaScript o Python + Sysadmin * Resources + What is open source? + Projects and applications + Organizations + Cloud technology + Open source alternatives + Linux * Downloads * About * Open Organization + Get started + Book series + Resources o What is an open organization? o How open is your organization? o What is an open decision? How I teach Python on the Raspberry Pi 400 at the public library | Opensource.com 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. 12 Jun 2021 Don Watkins (Correspondent) Feed 72 up Women programming Image by : WOCinTech Chat. Modified by Opensource.com. CC BY-SA 4.0 x Subscribe now Get the highlights in your inbox every week. 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. More on Raspberry Pi * What is Raspberry Pi? * eBook: Guide to Raspberry Pi * Getting started with Raspberry Pi cheat sheet * eBook: Running Kubernetes on your Raspberry Pi * Whitepaper: Data-intensive intelligent applications in a hybrid cloud blueprint * Understanding edge computing * Our latest on Raspberry Pi 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. pi400_library.jpg 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. pi400_library-teacher.jpg 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) pi400-spiral.jpg 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. Family learning and reading together at night in a room Teach kids Python by building an interactive game Open source tools can help anyone get started learning Python in an easy and fun way--making games. Moshe Zadka (Correspondent) Arcade games Learn Python by creating a video game Get to know Python the fun way using the step-by-step instructions in our new eBook. Seth Kenlon (Red Hat) Hands on a keyboard with a Python book Teach Python with the Mu editor Mu makes it easy to learn how to write Python code. Don Watkins (Correspondent) Topics Python Raspberry Pi Education About the author [donw2-crop] Don Watkins - Educator, education technology specialist, entrepreneur, open source advocate. M.A. in Educational Psychology, MSED in Educational Leadership, Linux system administrator, CCNA, virtualization using Virtual Box. Follow me at @Don_Watkins . More about me Recommended reading Looking at a map 5 handy guides to open source for teachers Digital images of a computer desktop How Linux made a school pandemic-ready Greenhouse garden with tomatoes How I monitor my greenhouse with CircuitPython and open source tools Python in a coffee cup. How Python 3.9 fixed decorators and improved dictionaries Women in computing and open source v5 Make your API better with this positional trick from Python 3.8 Hands on a keyboard with a Python book Slice infinite generators with this Python 3.7 feature Creative Commons License Subscribe to our weekly newsletter Get the highlights in your inbox every week. Find us: * Twitter * Facebook * Youtube * Mastodon * RSS Footer * Privacy Policy * Terms of Use * Contact * Meet the Team * Visit opensource.org For more discussion on open source and the role of the CIO in the enterprise, join us at The EnterprisersProject.com. The opinions expressed on this website are those of each author, not of the author's employer or of Red Hat. Opensource.com aspires to publish all content under a Creative Commons license but may not be able to do so in all cases. You are responsible for ensuring that you have the necessary permission to reuse any work on this site. Red Hat and the Red Hat logo are trademarks of Red Hat, Inc., registered in the United States and other countries. Copyright (c)2021 Red Hat, Inc. [footer_log] *