Teaching Python on Chromebooks is Easy with Trinket

teaching Python on Chromebooks
teaching Python on Chromebooks

When teaching Python on Chromebooks it can be difficult to find an extension that allows students to easily write, edit, run, and save their programs. There are a few extensions available, however often they do not import Libraries such as Turtle or display images, which makes some programming activities for beginners impossible to complete. A solution is trinket.io.

teaching Python on Chromebooks
Teaching Python on Chromebooks is possible with trinket.io.

Trinket.io lets your students write programs in any browser – which makes it ideal for teaching Python on Chromebooks. There is no software to install. All your students need to do is create a free account. To be able to save files in trinket.io a paid account is required.

Trinket is quite affordable. However, if there are financial constraints students can download their Trinket file at the end of each session. The file is zipped. This saves the program for later use or submission to the teacher. Alternately, the code can be copied from Trinket into Google Docs and saved as a file. To continue working on the program, the code would need to be copied from Google Docs back into Trinket.

TechnoKids Python programming projects, include TechnoTurtle and TechnoPython. The instructions are written for the IDLE Python Shell and Editor, which is software that can be downloaded onto desktop devices. The good new is, with only a few changes TechnoKids Python programming lessons will work with trinket.io. These slight modifications make teaching Python on Chromebooks possible! After all, the Python programming code is the exact same in EVERY TechnoKids assignment!

There a few differences in TechnoKids instructions when using Trinket.io. These are listed below:

1. Software Opening Instructions:

Each TechnoKids assignments starts with Open the Python Shell. This instruction needs to change to Sign into trinket.io.

2. Pick a Trinket:

To start programming, Trinket users must pick their file type from the New Trinket button. If completing TechnoPython, pick Python 3. If completing TechnoTurtle pick Pygame.

python 3 and trinket
Select Python 3 if using TechnoPython or Pygame if using TechnoTurtle.

3. Create a new file:

In Trinket you do not need to create a new file. The default Python program is called main.py. If you are using the free version you are best to write code on this tab because it is simpler to run.

trinket window
Students can write code on the main.py tab.

4. Program run instructions:

Trinket users don’t need to save before they run their program. Instead they can just click Run. Instead of opening in a different window, the output appears in the right side pane.

trinket window
In Trinket, the output appears in the right pane.

5. Python Shell instructions:

Trinket is designed to make Python program files. However, in TechnoPython there are some activities where students practice writing code in the Python Shell. In Trinket, to see the output as if it is written in the Python Shell select Console.

python shell trinket
Select Console to see output as it would appear in the Python Shell.

6. Open a saved file:

In TechnoPython and TechnoTurtle, the introductory lessons include editing an existing Python program file. This is done to explore the meaning of commands and learn about debugging. The free version of Trinket always wants to run the main.py file (which cannot be deleted). To solve this issue, upload the TechnoKids Python file in Trinket, then copy the code to the main.py tab. Afterwards, delete the unwanted tab so that only main.py is in view.

delete tab
Upload the saved Python file. Copy the code to main.py. Delete the unwanted tab.

7. Turtle canvas size is smaller:

The default canvas size in Trinket is about half the size as it is when using the IDLE Python Editor. It is roughly 375 x 375. Use smaller numbers when setting how the turtle moves, draws artwork, or positions text. TechnoTurtle has a trinket folder with sample programs and images designed for a smaller canvas!

smaller canvas
Use smaller numbers when using the Turtle canvas in Trinket.

8. Upload pictures to Trinket:

A few activities in TechnoTurtle use a saved picture. Students use it to move their turtle through a maze or change the image of their Turtle. The code is exactly the same. However, the picture files must be uploaded into the Trinket File Library.

trinket file library
Upload image files to the Trinket File Library.
TechnoKid has created a Trinket folder with sample programs and images designed for the Trinket Turtle canvas.

Christa Love

Christa Love, Curriculum Developer & Teacher ~ I am passionate about blending technology into curriculum. Whether it is programming, video production, graphic design, or digital citizenship, I am interested in how apps and tools can be used to enhance learning. Throughout the years I have designed many TechnoKids technology projects. My favorite part of curriculum development is field-testing the ideas to determine the activities that work best in real classrooms. I write about what I have learned that can save teachers time in their own curriculum planning.

You may also like...