Page 25 - RoboGenius Pro C3
P. 25

PSEUDOCODE

                 Pseudocode is a simple way to describe what a robot should do before writing the

                 actual code. It uses plain words instead of symbols, so anyone can understand the
                 steps.

                 Let’s say you want a robot to clean the floor. To program the robot, you need to give
                 it the steps in the correct order.

                 Here’s how the steps might look like in pseudocode:

                 Start

                 Move forward

                 Turn left

                 Sweep the floor

                 Turn right

                 Move forward

                 Stop

                 With pseudocode, you can easily plan what the robot should do and later, you can
                 turn these simple instructions into real code.


                      Ask AIRO


                      Why is pseudocode written in plain words instead of symbols?





                  ECOTECH       Robots are being used to monitor ocean pollution, collecting trash and studying
                  ENERGY        marine life to protect underwater ecosystems.










                   «   A sequence means doing things in the right order, step by step.
                   «   Robots need to follow the right order to do their job properly.

                   «   A loop helps the robot repeat the same actions automatically, so you don’t need to tell it
                       every time.

                   «   Pseudocode uses plain words instead of symbols, so anyone can understand the steps.






                                                                        Logical Thinking and Early Algorithms
                                                                                                                    23
   20   21   22   23   24   25   26   27   28   29   30