Blogs

Follow Our Future Articles

Get new content delivered directly to your inbox.

Coding Micro:bit with Python – Which Python Editor to Choose From?

If you feel that LEGO robot is too expensive, you have another choice micro:bit. There are several editors we could use to code micro:bit. What are their differences and which one is better if we want to code micro:bit with Python? In this post, I would like to compare briefly several editors for micro:bit. The …

Continue reading Coding Micro:bit with Python – Which Python Editor to Choose From?

Use LEGO MindStorms Smart Hub to Design a Dodge Game – This Time Using Python

This post is closely related to my previous post – use LEGO MindStorms Smart Hub to design a dodge game. The difference is that in this project, I will use Python to implement the same functionality as I did in the previous post. If you are interested, you could open the two posts side by …

Continue reading Use LEGO MindStorms Smart Hub to Design a Dodge Game – This Time Using Python

Use LEGO MindStorms Smart Hub to Design a Dodge Game – Refer to a Micro:bit Sample Project

Recently, we have been exploring Micro:bit and its huge eco-system to see if we could bring some high-quality lessons to our existing workshop portfolio. Honestly, I am amazed by the Micro:bit eco-system. It is compatible to large amount of hardware, especially the sensors. Soon, I will update a post about the comparison between Micro:bit and …

Continue reading Use LEGO MindStorms Smart Hub to Design a Dodge Game – Refer to a Micro:bit Sample Project

First Experience of CoderZ and Comparison between Cyber Robotics and Physical Robotics

The first sight of CoderZ gave me the impression that it was teaching some simple operations of turning and moving, as well as math calculation, especially when I do the activities in its trial lesson CoderZ Adventure with LEGO Education Spike Prime. If that is the case, the difference between cyber robotics and physial one …

Continue reading First Experience of CoderZ and Comparison between Cyber Robotics and Physical Robotics

Find Maximum Prime Factor of a Number by Using Python – Algorithm Explanation

Recently, I am teaching students algorithm using Python. One question is to find maximum prime factor of a given number. When we consider algorithm, we should consider both the running time and occupied memory of the program when the input is an extremely big number. The following algorithm is very typical to get the prime …

Continue reading Find Maximum Prime Factor of a Number by Using Python – Algorithm Explanation

A Method to Encrypt the Answer in Scratch Programming

If you are designing a quiz project in Scratch, you will check if the user could answer the questions correctly. However, since all the published projects share the code, your user could always “see inside” of the project and get the answer, like the following code snippet. How could you test your user without getting …

Continue reading A Method to Encrypt the Answer in Scratch Programming

PyGame is too complicated? Try PgZero

In my previous posts, I introduced how to use PyGame to design 2D games with Python language. Pygame adds functionality on top of the excellent SDL library. User controls the main loop, designs their program functions and different sprites’ interaction. This gives user greater control in creating fully featured games and multimedia programs in the Python …

Continue reading PyGame is too complicated? Try PgZero

Which Apps Should I Use for LEGO Robots?

Recently, LEGO has updated its robotics software, especially for the products of LEGO MindStorms EV3 and LEGO MindStorms Inventor. Facing so many apps, you might wonder which apps you should install and what are their differences? In this post, I will introduce the apps of three LEGO robots, their download positions and differences. LEGO MindStorms …

Continue reading Which Apps Should I Use for LEGO Robots?

From PyGame to GoDot – What’s Their Difference?

About PyGame If you would like to use Python to develop 2D game, your first choice might be PyGame, which is popular among Python game developers. Go to the website https://www.pygame.org/docs/ref/key.html, you could browse all of the classes and their explanation. All of the stuffs are grouped into the pygame library. If you do not …

Continue reading From PyGame to GoDot – What’s Their Difference?

Use PyGame to Create Tetris Game – An Updated Version Part 2

In my previous post, I introduced the first part of Tetris game written in Python. Today, let’s continue the left part of the code. In the first part, we have introduced the class Piece and several functions which will be used by the main() function. Now, let’s see what the main() function is doing. Starting …

Continue reading Use PyGame to Create Tetris Game – An Updated Version Part 2

Use PyGame to Create Tetris Game – an Updated Version

In the previous posts, I once analyzed a Tetris game developed in Scratch. It uses Pen drawing tab to draw all the tetris pieces. However, due to the limitation of data structure in Scratch, the code structure is super complicated compared to other Scratch projects. How about we implement it in Python? On YouTube, some …

Continue reading Use PyGame to Create Tetris Game – an Updated Version

Learn Scratch by Analyzing Others’ Project – Platformer Game with Editing Functionality Part 4

In the previous posts, I introduced the core sprite of the Blocky game, the “Blocks” sprite, which is responsible for adding, deleting or editing the environment blocks. Starting from this post, we are going to switch to the other core sprite – Hitbox. Homescreen UI Sprite Before introducing the code of Hitbox sprite, I would …

Continue reading Learn Scratch by Analyzing Others’ Project – Platformer Game with Editing Functionality Part 4

Python Programming: Use Turtle Library to Realize Animation

In the previous post, I use Scratch 3.0 to create animation with Pen functionality. Could we do the same thing using Python? Definitely Yes. We could use Turtle library to generate the same effect, but with more concise code structure. In this post, Let me introduce how to implement it. If you would like to …

Continue reading Python Programming: Use Turtle Library to Realize Animation

Learn Scratch by Analyzing Others’ Project – Platformer Game with Editing Functionality Part 3

In the previous post, I introduced part of the Stamp block. As I have said, this is a very long code segment and its functionality could be divided into three parts. In the previous Part 2 analysis, I analysed the first functionality – drawing the blocks on the stage. In this post, I will continue …

Continue reading Learn Scratch by Analyzing Others’ Project – Platformer Game with Editing Functionality Part 3

Learn Scratch by Analyzing Others’ Project – Platformer Game with Editing Functionality Part 2

In Part 1 of this project, I introduced how this game realized some stylish visual effects, how to encode its data and store the data in a file, and how to import the data from a file by decoding its data and filling in several lists. In this post, I would like to explain how …

Continue reading Learn Scratch by Analyzing Others’ Project – Platformer Game with Editing Functionality Part 2

Learn Scratch by Analyzing Others’ Project – Platformer Game with Editing Functionality Part 1

In previous post, I summarized the key points of platformer game tutorial video uploaded by well known Youtuber. However, some platformer games could even go further. They could allow user to define the ground, obstacles, checkpoints and then save their level setting information to their computer. When the user plays the game, they could start …

Continue reading Learn Scratch by Analyzing Others’ Project – Platformer Game with Editing Functionality Part 1

Analyze Python Project – Integrate Tkinter and Turtle and Respond to Mouse and Keypress

In previous posts, I introduced some sample projects from Pygame installation folder. Besides Pygame, Turtle and Tkinter modules are also popular for Python learning beginners. Tkinter package is a standard Python interface to Tk GUI toolkit. It could design window and different widgets, such as button, textbox, label, canvas and handle the interaction with user …

Continue reading Analyze Python Project – Integrate Tkinter and Turtle and Respond to Mouse and Keypress

Analyze PyGame Example Project – Music_drop_fade.py – Part 2

In the previous post, I introduced the first part of the project Music_drop_fade.py. It defines functions that would be called by main() function. In this post, I will introduce the main() function and wrap up the whole project. So let’s start now! The main() function starts at line 148. It first defines several global variables …

Continue reading Analyze PyGame Example Project – Music_drop_fade.py – Part 2

Analyze PyGame Example Project – Music_drop_fade.py – Part 1

In this post, I would like to analyze another Python sample project. Its function is to play the music file when dragging and dropping them to the project window. The program could also respond to different keys to change volume, play forward or rewind. Those functions have being listed at the header section of the …

Continue reading Analyze PyGame Example Project – Music_drop_fade.py – Part 1

Design Puzzle Game “Eight Queens” with PyGame – A Detailed Code Analysis

In previous post, I introduced how to use PyGame to convert a Scratch project into a Python project. If you are interested in that project, you could refer to this post: Forest Maze. In today’s post, I would like to introduce another project written in Python and run on PyGame. Compared to previous project, this …

Continue reading Design Puzzle Game “Eight Queens” with PyGame – A Detailed Code Analysis

New LEGO MindStorms – Exploration Rover Model Analysis

In the new released LEGO MindStorms, its app contains multiple models. Some models come from LEGO Community. In today’s post, let’s build one model and analyze its structure. You could find this model from LEGO app shown as below. Model Structure This model is pretty big and heavy. Its body is widely stretched and symmetric. …

Continue reading New LEGO MindStorms – Exploration Rover Model Analysis


Follow Our Future Articles

Get new content delivered directly to your inbox.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.