elena_gancedo

Nursery rhime

Aug 5th, 2019
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.01 KB | None | 0 0
  1. # Challenge 1
  2.  
  3. import turtle
  4. elena = turtle.Turtle()
  5.  
  6. elena.penup()
  7. def line(words, horiz_pos = -10):
  8.     x,y = elena.pos()
  9.     elena.goto(max(horiz_pos, -100), y)
  10.     elena.write(words)
  11.     x,y = elena.pos()
  12.     elena.goto(x, y - 25)
  13.  
  14. def by(author):
  15.     x,y = elena.pos()
  16.     elena.goto(x + 70, max( -100, y -30))
  17.     elena.write(author)
  18.     x,y = elena.pos()
  19.     elena.goto(0, y)
  20.    
  21. elena.color('indigo')
  22. elena.goto(-80, 180)  
  23. line("*Twinkle Twinklw Little Star*")    
  24. elena.color('blue')
  25. elena.goto(-50, 150)
  26. line("Twinkle twinkle little star,")
  27. line("how I wonder what you are.")
  28. line("Up above the earth so high,")
  29. line("Like a diamond in the sky,")
  30. line("Twinkle twinkle little star,")
  31. line("how I wonder what you are")
  32. elena.color('magenta')
  33. elena.goto(-50, -10)
  34. line("Twinkle twinkle little star,")
  35. line("how I wonder what you are.")
  36. line("Shining through the stars so bright,")
  37. line("Like a diamond in the night,")
  38. line("Like a diamond in the night,")
  39. line("how I wonder what you are")
Add Comment
Please, Sign In to add comment