Python Forum
Help drawing circles with turtle - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: Help drawing circles with turtle (/thread-7059.html)



Help drawing circles with turtle - songminguk - Dec-19-2017

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.


RE: HELP! - micseydel - Dec-19-2017

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.


RE: HELP! - songminguk - Dec-19-2017

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


RE: HELP! - squenson - Dec-19-2017

Could you please put your code between [python] and [/pyt[i][/i]hon] as indentation is very important in python.