From 8b287676028cfb8f6495e898a2e03026715add4f Mon Sep 17 00:00:00 2001 From: C Tu Date: Tue, 14 May 2024 18:32:20 +0630 Subject: [PATCH] Make changes in turtle_graphics.py --- turtle_graphics.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/turtle_graphics.py b/turtle_graphics.py index da671ef3..6c24d4cf 100644 --- a/turtle_graphics.py +++ b/turtle_graphics.py @@ -14,16 +14,16 @@ def draw(): x_pos = randint(-200,200) y_pos = randint(-200,200) - tt.pu() + tt.penup() tt.setpos(x_pos, y_pos) start_position = tt.pos() - tt.pd() + tt.pendown() tt.begin_fill() while True: tt.forward(size) tt.left(angle) - if abs(tt.pos() - start_position) < 1: + if tt.distance(start_position) < 1: break tt.end_fill()