Make Your LEGO Robot Play Tic-tac-toe Game

When we have a LEGO MindStorms set, we could create different models to simulate real world mechanics or creature. We could make the robot carry a stuff, follow a route to transfer the stuff. There is no limitation for the creation. In this post, I would like to introduce a project of having the robot …

Continue reading Make Your LEGO Robot Play Tic-tac-toe Game

A Self-help Guide to Learn Pgzero and Develop Python Games

If you have read my previous post PyGame is too complicated? Try PgZero, you might have an impression that Pgzero is much simpler to be used than PyGame. On the other hand, you might think it could only develop some simple games. Actually, using proper tools, we could use Pgzero to develop any games which …

Continue reading A Self-help Guide to Learn Pgzero and Develop Python Games

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

Remotely Control Your LEGO MindStorms Inventor

Assuming you have created a LEGO vehicle with the robot LEGO MindStorms Inventor, now you would like to use its remote control function to control it manually. What should we do? In this post, I would like to introduce a simple vehicle model and the code to realize remote control. Finally, I will explain how …

Continue reading Remotely Control Your LEGO MindStorms Inventor

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?

Play LEGO Robotics – Common Steps of Designing Your Own Model

No matter which LEGO robotics model you are playing with - LEGO WeDo 2.0, LEGO EV3, LEGO Spike Prime or LEGO MindStorms Inventor, one of the most exciting tasks could be to create your own model and make the model move with the control of LEGO App or other software. However, it is often easier …

Continue reading Play LEGO Robotics – Common Steps of Designing Your Own Model

LEGO Spike Prime – Design an automatic door

In today's post, I would like to introduce a model made of LEGO Spike Prime. If you are using LEGO MindStorms, you could design this model, too. Since this two sets share many similar blocks. This is an open-ended project for the students. As instructor, we just put forward the requirement and then left it …

Continue reading LEGO Spike Prime – Design an automatic door

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?