Challenge 2 Write a function to draw a line and map it to a button
Underneath your code that creates your Turtle p=RawTurtle(s1) but above TK.mainloop( ) create a function.
A function will only be run when it is called by another piece of code.
def fd10():
#def defines a function fd10 is the name
#p.fd(10) is code that will be run when
#this function is called by the button

Underneath the function but above TK.mainloop( ) create this button code.
but1=TK.Button(text="Forward 10",command=fd10)

  1. Variable that button is created inside
  2. Makes the button on the TK canvas window
  3. Text to put on the the top of the button
  4. Tells the button to run the code inside function called fd10
  5. Places the button on the window
  6. Decides where it can be placed (top, bottom, right or left)

Save your code and test it