Pages

Friday, June 23, 2017

Programming Concepts

In class we are learning to demonstrate programming concepts.
I am using Python Trinket to work out a challenge.
I can use the 'For' loop to write smart or efficient code.

for i in range(0,3):
   myPen.forward(70)
   myPen.right(90)
   myPen.forward(120)
   myPen.left(90)
   myPen.forward(45)
   myPen.left(90)
   myPen.forward(120)
   myPen.right(90)
 
myPen.forward(30)

This is the code to complete the challenge.