Advertisement
Guest User

Untitled

a guest
Aug 27th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. from turtle import *
  2.  
  3. hours = int(input('Hour: '))
  4. minutes = int(input('Minute: '))
  5.  
  6. # Draw the clock face
  7. for i in range(12):
  8. penup()
  9. forward(100)
  10. pendown()
  11. forward(20)
  12. penup()
  13. backward(120)
  14. right(30)
  15.  
  16. # Enter your code for "What's the Time" here.
  17. pensize(4)
  18. hour = hours*30
  19. hour2 = hour + (minutes * 0.5)
  20. minute = minutes*6
  21. penup()
  22. left(90)
  23. right(minute)
  24. pendown()
  25. pencolor('black')
  26. forward(90)
  27. penup()
  28. right(180)
  29. forward(90)
  30. right(180)
  31. left(minute)
  32. right(hour2)
  33. pendown()
  34. pencolor('red')
  35. forward(60)
  36. penup()
  37. right(180)
  38. forward(60)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement