Using Variables

Script adapted from [1 p. 195]

Practice Tracing the Code

Copy and fill out the table with the following:

  • What the starting value of variable “DriveLength” will be at the beginning of each loop repetition
  • What the input value of the wait block will be in that loop
  • What the new value of “DriveLength” will be after the increment block inside the loop runs

The first two rows have already been filled in for you. 

Loop #Starting value of DriveLengthWait block input value (in milliseconds)New value of DriveLength
112002
224003
3
5
7
10
Source: [1 p. 197]

Activity adapted from [1 p.195-197]