Python Forum
Help drawing circles with turtle
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help drawing circles with turtle
#1
1. Write a program to draw a circle circumscribing a square - with each side = 200 - circumscribing another circle (inside the square).  Use 'light green' for the background color, and black for lines.  Use fill color 'red' for the first (outer) circle, 'white' for the square, and 'blue' for the 2nd (inner) circle.
Reply
#2
What have you tried? If this is urgent, you'll probably be a lot happier with the outcome if you spend some time writing a quality post, rather than us having to go back-and-forth. At least glance at https://python-forum.io/misc.php?action=help to see if there's anything that stands out.
Reply
#3
import turtle
from turtle import *

t = turtle.Turtle()
t.hideturtle()
turtle.bgcolor("light green")
t.penup()
t.goto(-100,-80)
t.pendown()

t.color('red','yellow')
t.begin_fill()
for i in range(3):
t.forward(50)
t.left(90)
t.forward(50)
t.left(90)
t.forward(50)
t.left(90)
t.end_fill()
turtle.done()

This is what i got
Reply
#4
Could you please put your code between [python] and [/pyt[i][/i]hon] as indentation is very important in python.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Create a turtle drawing from .txt file Noob101 20 8,970 Jan-29-2021, 04:13 PM
Last Post: nilamo
  Drawing wheels in a turtle woehh 1 1,896 Apr-23-2020, 02:58 PM
Last Post: deanhystad
  Turtle Polygon drawing program tp_oz 3 3,177 Jul-23-2019, 01:01 PM
Last Post: ichabod801
  Drawing circles with loops (solved) Villr 0 5,023 Oct-01-2018, 10:51 AM
Last Post: Villr
  Turtle drawing Right Triangle Zatoichi 3 5,726 Feb-26-2018, 12:24 AM
Last Post: Zatoichi

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020