Advertisement
otorp2

turtle

Dec 27th, 2019
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. # Step 1: Make all the "turtle" commands available to us.
  2. import turtle
  3. WIDTH, HEIGHT = 256, 256
  4.  
  5. #screen = Screen()
  6.  
  7.  
  8. # Step 2: Create a new turtle. We'll call it "bob"
  9. bob = turtle.Turtle()
  10. bob.screen.setup(WIDTH + 4, HEIGHT + 8)
  11. bob.speed(10)
  12. bob.screen.screensize
  13. #bob.screen.window_height(300)
  14.  
  15. # Step 3: Move in the direction Bob's facing for 50 pixels
  16. bob.pensize(10)
  17. bob.forward(100)
  18. bob.right(90)
  19. bob.backward(40)
  20. bob.circle(100,360,50)
  21.  
  22.  
  23. turtle.done()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement