CODE TT1
Start up MU editor and let us put in just a few lines of code to get drawing.
import turtle
This enables you to use the turtle module
turtle.write("Hello, I am a turtle!")
This writes text to the screen!
turtle.forward(100)
This moves the turtle forward by 100
turtle.shape("turtle")
This changes the turtle to its turtle shape!
This enables you to use the turtle module
turtle.write("Hello, I am a turtle!")
This writes text to the screen!
turtle.forward(100)
This moves the turtle forward by 100
turtle.shape("turtle")
This changes the turtle to its turtle shape!
What you will see!You might need to use to keep the window open:
turtle.done()
Write anything!Above line 2, add:
j=input("What would you like me to write?")
Then change line 2 to:
turtle.write(j)
What happens? Can you enter your own text?
turtle.done()
Write anything!Above line 2, add:
j=input("What would you like me to write?")
Then change line 2 to:
turtle.write(j)
What happens? Can you enter your own text?
Exercise 1: Match the length of the text?
Can you change a number in the code, so that the underline matches what you wrote?
Can you change a number in the code, so that the underline matches what you wrote?