Advertisement
maddi_jkl

2.13.6 Codehs

Feb 26th, 2021 (edited)
4,603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. ### initial set up
  2. penup()
  3. setposition(0,-200)
  4. pendown()
  5.  
  6. ### drawing the circle
  7. def m_circle(radius):
  8.     begin_fill()
  9.     color("gray")
  10.     circle(radius)
  11.     end_fill()
  12.  
  13. ### getting the users input for the bottom circle radius    
  14. get_radius = int(input("What is this circles radius?: "))
  15.  
  16.  
  17. ### draws the circles using the paramater and sets proper position afterwards
  18. m_circle(get_radius)
  19.  
  20. penup()
  21. left(90)
  22. forward(200)
  23. right(90)
  24.  
  25. m_circle(get_radius / 2)
  26.  
  27. penup()
  28. left(90)
  29. forward(100)
  30. right(90)
  31.  
  32. m_circle(get_radius / 4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement