Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. j=0
  2. g=1
  3. x=[1]
  4. y=[1]
  5. r=[1]
  6. while g<>0:
  7. x[j]=input()
  8. x=x+[x[j]]
  9. y[j]=input()
  10. y=y+[y[j]]
  11. r[j]=input()
  12. r=r+[r[j]]
  13. g=r[j]
  14. j=j+1
  15. if r[j]<0:
  16. print('error, r must be >0')
  17.  
  18. import turtle
  19. max=y[0]
  20. for i in range(1,j+1):
  21. if y[i-1]>max:
  22. max=y[i-1]
  23. a=i-1
  24.  
  25. for i in range(1,j+1):
  26. if a<>i:
  27. turtle.pencolor('green')
  28. turtle.penup()
  29. turtle.goto(x[i-1],y[i-1])
  30. turtle.pendown()
  31. turtle.circle(r[i-1])
  32. else:
  33. turtle.pencolor('red')
  34. turtle.penup()
  35. turtle.goto(x[i-1],y[i-1])
  36. turtle.pendown()
  37. turtle.circle(r[i-1])
  38.  
  39. turtle.exitonclick()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement