Python Projects - Unknown 9

Python Turtle

OBJECTIVE:Draw Concentric Circles

 



CODE:

import turtle
import random

dot = turtle.Turtle()
screen=turtle.Screen()
screen.setup(420,320)
dot.pensize(2)
dot.speed(1)
dot.shape('arrow')
n=0

while n<5:
dot.pencolor('red')
n=n+1
dot.penup()
dot.setpos(0,-n*20)
dot.pendown()
dot.circle(20*n)


Draw Concentric Circles Python Turtle



CHALLENGE:Try changing color of each circle





Media and Press Coverage