Skip to content
Muslu Yüksektepe

Çocuklara proje fikirleri

Python project ideas for children and programming beginners that need no extra libraries or internet access.

This repository contains small project ideas that children and programming beginners can build with Python, each with sample code. I put it together in May 2023. There are 16 separate programs in the repository, and each one is a single file. I deliberately chose examples that need no extra libraries and no internet connection, so they can be run right away on any computer with Python installed.

Purpose

For a child who is just starting to program, the most important thing is to see their code working quickly. Installing packages, opening an account to get an API key or dealing with an internet connection can kill their enthusiasm at the very first step. That is why I limited every example to the modules that come with Python itself. All the programs run in the terminal, take input from the user with input() and print the result on screen. The code is kept short, and variable and function names are in Turkish, so children can follow the code they read more easily.

What is included

  • Games: a number guessing game, a word guessing game, a two-player tic tac toe, a text adventure that moves on according to your choices and a maths quiz that asks random questions.
  • Time-related programs: a digital clock that ticks every second, an alarm that goes off at the time you enter and a timer that tells you when the given time is up.
  • Everyday tools: a calculator for the four basic operations, a notebook that saves notes to a text file, a password generator that produces a password of the requested length and a program that recommends a random film from a list.
  • Text and number exercises: a program that reverses a word, a program that tells whether a number is odd or even, a small three-question survey and an analysis program that finds the number of words and sentences in a text file and its most frequent word.

What it teaches

Read in order, the examples touch on most of Python's basic topics. The number guessing game shows the while loop and if/elif/else conditions. Tic tac toe demonstrates building a game board with nested lists and defining functions inside a function. The notebook and text analysis programs cover writing to and reading from a file; the notebook also shows how to catch the error raised when the file does not exist yet. The text analysis program also shows counting words with a dictionary. The clock, alarm and timer use the datetime and time modules, and the password generator uses the random and string modules. Reversing a word is done in a single line with slicing ([::-1]).

How to use it

Each file runs on its own; a command such as python "Sayı Tahmin Oyunu.py" is enough. When working with a child, I suggest running and playing with the program first, then reading the code line by line and making small changes. Increasing the number of guesses, adding division to the quiz or writing a new path for the text adventure are good starting points for a child to see that they can change the code themselves.

Category
Teaching & community
Year
2023

Technologies

  • Python
  • Education

Links

  • GitHub https://github.com/muslu/cocuklara_fikirler

Back to all projects