UKS3-S15-2 Resource sheet

Python Variables: Level 106

At this level, we are looking at a spiral path

Describe the shape of this spiral. Think about the direction and number of steps needed for each turn. Can you find a pattern?

from van import Van

my_van = Van()


number = 1
 		
while not my_van.at destination():

    my_van.turn_right()
    for count in range(number):
        my_van.move_forwards()
    number = number + 1					

Explain how this program works, using the word variable:

Last updated

Logo

Rapid Router resources

KS1KS2KS3

Kurono resources

TeacherStudent

© Copyright 2023 Ocado Group plc. All rights reserved