Page 53 - Touchcode_C8_Flipbook
P. 53

Step 5:  Type the code:
                            Size = 10

                            builder.teleport_to(pos(0, 0, 0))
                            while Size == 0:

                                builder.move(FORWARD, 1)
                                builder.move(UP, 1)
                                Size += 1

                            builder.trace_path(REDSTONE_BLOCK)


















                  Step 6:  Click on the ‘Start’          button, present on the bottom right side of the screen.

































                     Well done, you have learnt to create a staircase using ‘while’ loop in Python
                     editor!











                                                                                           Coding in Minecraft   51
   48   49   50   51   52   53   54   55   56   57   58