Skip to content

EmikoHigashi/games2025_12_26

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

banner

📠Simple Arrow-Key Movement Program for Kids🚗

This repository contains a very simple Python program designed for children who are learning programming.
For example, using the arrow keys on the keyboard, the player can move a block around the screen.

The code is intentionally small and easy to read, so beginners can understand:

  • how to read keyboard input
  • how to update a position on the screen
  • how to run a basic game loop

Feel free to use this as a starting point for teaching or for creating your own small games.

Calc.py 👉 Simple Calculator GUI (for Kids)

This repository contains a beginner‑friendly calculator program written in Python using tkinter.
It displays a simple calculator window where kids can type or click buttons to do math.

What this program teaches

  • How to build a GUI with tkinter
  • How to create buttons and input fields
  • How to handle keyboard and mouse input
  • How to evaluate math expressions safely using ast

Features

  • Supports basic operations: +, -, *, /, %, //, **, and parentheses
  • Buttons for digits, operators, clear (C), backspace (), and equals (=)
  • Keyboard input also works (type directly or press Enter)

How to run

python Calc.py

Motorcar.py 👉 Simple Motorcar Program (Arrow-Key Movement)

This repository contains a very simple Python program for kids who are learning programming.
It uses tkinter to draw a small toy car on the screen, and the car can move left and right using the arrow keys.

What this program teaches

  • How to create a window using tkinter
  • How to draw shapes (rectangles, circles, polygons)
  • How to detect keyboard input
  • How to update objects on the screen in a loop

How to run

python Motorcar.py

MovingBlock.py 👉 Simple Airplane Program (Move with Arrow Keys)

This is a simple Python game made with pygame, designed for kids who are learning programming.
An airplane appears on the screen, and you can move it freely using the arrow keys (or WASD keys).

What this program teaches

  • How to open a game window with pygame
  • How to load images from files
  • How to read keyboard input continuously
  • How to move an object smoothly using time (dt)
  • How to rotate an image to match the movement direction

Controls

  • Left / Right / Up / Down → Move the airplane
  • A / D / W / S → Also works
  • ESC → Quit the game

How to run

Install pygame first:

python -m pip install pygame

⭐How to Download⭐

Click the “Code” button and select “Download ZIP” to download all files as a ZIP archive.

⛏️What can you change in these programs?✂️

This repository contains three simple Python programs designed for kids who are learning programming.
They are intentionally easy to modify so children can experiment, customize, and learn by trying things out.
Here are some example ideas for what they can change:

1. Calc.py (Simple calculator)

  • Add subtraction, multiplication, or division
  • Change the button colors or sizes
  • Adjust the font size of the input field
  • Make the result appear larger
  • Create a “quiz mode” that asks math questions

2. Motorcar.py (Car animation)

  • Change the color of the car
  • Adjust the speed of the movement
  • Change the color or thickness of the road lines
  • Make the car move left and right
  • Replace the rectangle car with another shape

3. MovingBlock.py (Airplane game)

  • Change the speed of the airplane
  • Replace the background image with another picture
  • Resize the airplane image
  • Modify the key controls (not only arrow keys)
  • Use your own drawing instead of the airplane image

Limitations / Notes

  • These programs are designed for beginner-level learning, especially for kids.
  • Tested on Python 3.9–3.12. Other versions may behave differently.
  • The Pygame example requires:
    • pygame installed (pip install pygame)
    • background.png and airplane.png placed in the same folder as the script
    • A display environment (may not work on headless servers)
  • The Tkinter examples require:
    • A desktop environment (Windows / macOS / Linux)
    • Japanese fonts may appear differently depending on the OS
  • These examples are intentionally simple and do not include:
    • Error handling for advanced edge cases
    • Mobile or web support
    • High-performance rendering
  • The code is meant for learning and experimentation, not for production use.

🌍

日本語の簡単な解説

子供向けのシンプルなPythonコードです。プログラミング学習をしているお子さん向けに作りました。このコードを自由に作り変えて、学習に役立ててください。

Calc.py

実行すると電卓が現れます。

Motorcar.py

実行すると矢印キーで動く、自動車が現れます。

MovingBlock.py

実行すると矢印キーで動く、飛行機が現れます。

  • 👉 ariplane.png ファイルと、background.png ファイルを同じフォルダに置いてください
  • 👉 実行する前に、Windowsのコマンドプロンプトでこのように入力して、pygameをインストールしてください。
python -m pip install pygame
  • 👉 Windowsのコマンドプロンプトを起動するには、タスクバーの検索ボックス(虫眼鏡の形のアイコン)に「cmd」または「コマンドプロンプト」と入力します。

⛏️どこを変えて遊べるの?✂️

このリポジトリに入っている 3 つのプログラムは、子どもが自由に書き換えて遊べるように作っています。
以下は、学習のきっかけになる「変更してみると楽しいポイント」の例です。

1. MovingBlock.py(飛行機が動くゲーム)

  • 飛行機のスピードを変える
  • 背景画像を別のものに差し替える
  • 飛行機の大きさを変える
  • キー操作を「上下左右」以外に変えてみる
  • 飛行機の画像を自分で描いた絵に置き換える

2. Motorcar.py(車が走るプログラム)

  • 車の色を変える
  • 車の動く速さを変える
  • 背景の線の色や太さを変える
  • 車が左右に動くように改造する
  • 車の形を四角形から別の形に変える

3. Calc.py(簡単な計算アプリ)

  • 足し算だけでなく、引き算・掛け算・割り算を追加する
  • ボタンの色や大きさを変える
  • 入力欄のフォントサイズを変える
  • 計算結果を大きく表示する
  • 自分で「問題を出すモード」を作ってみる

⭐ダウンロードの仕方⭐

「Code」ボタンをクリックして「Download ZIP」を選択すると、zipファイルとしてダウンロードできます。

Releases

No releases published

Packages

 
 
 

Contributors

Languages