Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- import turtle
- import random
- wn = turtle.Screen()
- wn.bgcolor('lightyellow')
- fred = turtle.Turtle()
- fred.penup()
- fred.speed(0)
- for i in range(10000):
- x = random.randint(-300,300)
- y = random.randint(-300,300)
- fred.goto(x,y)
- if x*x + y*y <= 300*300:
- fred.dot("red")
- else:
- fred.dot("blue")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement