Thursday, June 29, 2017

Programming Concepts

As a year 7 student from Lake Brunner School, we are exploring programming concepts and we are focusing on our friend, the 'four' loop. This means that we don't have to write the same code over and over again, we can be more efficient. We tried the maze challenge and we changed the colours to personalize it to our liking. We then replace the 24 lines of code with just 8 lines by putting in this very important code. 

for i in range (0,3):
myPen.forward(68)
  myPen.right(90)
  myPen.forward(120)
  myPen.left(90)
  myPen.forward(50)
  myPen.left(90)
  myPen.forward(120)
  myPen.right(90)

myPen.forward(70)

I got this challenge from: 


     

No comments:

Post a Comment

Thank you for your positive, thoughtful, helpful comment.