Notice: While Javascript is not essential for this website, your interaction with the content will be limited. Please turn Javascript on for the full experience.

Elementary school education: Is it love or just Python?

Author: Ivana Vezjak (ICT teacher at Elementary school August Šenoa Osijek, Croatia) Date: May 2020

Python is the main programming language we use in our school to teach students basic programming concepts and algorithms. Our students love Python - with Python they can create their own apps, websites, quizzes, solve different problems and much more. Students use different modules like Pygame, Matplotlib, Numpy, Tkinter etc. to turn their ideas into reality and develop skills like computational thinking, creativity and problem solving.

Last year (October, 2019) approx. 90 students from our school (Elementary School August Šenoa, Osijek, Croatia), grades 5-8, participated in the EU Code Week. Students made their own chatbots and love calculators in the programming language Python, created virtual worlds which they experienced themselves later, and explored them with VR glasses etc. 8th grade students have developed an application in Python, which we called the Love Calculator. It is something you should definitely try out. The application allows the entry of a male or female name and clicking the button the “love percentage” is written on the screen.

Students first created their own backgrounds and pictures for the application. There are a lot of drawing tools available online, such as https://sketch.io/sketchpad. Making their own graphic materials is much more interesting to students than just downloading finished drawings from the internet. After creating the drawings, students have learnt how to use Python’s module Tkinter to create the basic graphic window. This was in a way the design - they had to determine the background picture or colour, set the fields for entry of text and buttons, choose colours and fonts for their application etc. When they were satisfied with the visual look of the application, they started the coding.

The main part of the programme was comprised of writing two programming functions - one which generated a random number (the so-called love percentage) and another, which checked the entry of the user into the field for text and written out the love percentage to the screen. This was somewhat a more demanding part. Students are expected to think about the way in which the programme functions, to create a good algorithm and write it all down in Python.

We can find plenty of these kinds of programmes online, in the form of calculators or quizzes which actually only return a random number, text or percentage. Students have seen themselves various programmes on the internet which function in a similar way, and by creating such a programme they realised how they actually function. Through this project they learnt that online love calculators have nothing to do with love, but that behind them there exists a good algorithm in a certain programme language, and that the love percentage is nothing else but a randomly generated number! The students had great fun working on this project, but also learnt that you should not trust everything you see online. This activity has also motivated them to actively create digital content, develop computer and logical thinking and learn the ways in which technology functions, and not just to be passive users of technology.

This simple project is intended to students who already have a basic experience in programming. The whole project can be seen on this link: https://repl.it/join/rirepnnq-ivanav

For the design of the project students can use some of the online Python editors which support work with Tkinter module (such as https://repl.it/) or they can work locally on their computers. Tkinter module is a part of a standard Python library and it is not necessary to separately install it if Python is already installed on your computer.

Few images: https://carnet-my.sharepoint.com/:f:/g/personal/ivana_duranic_skole_hr/ElktGdXhmRJMp0O1xrK21rAB1VfjDFlrliJS9r742PAHww?e=lmE7Bm

Happy Pythoning!