-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUFTurtlemodule1.py
More file actions
50 lines (45 loc) · 1.13 KB
/
UFTurtlemodule1.py
File metadata and controls
50 lines (45 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: User
#
# Created: 27/04/2019
# Copyright: (c) User 2019
# Licence: <your licence>
#-------------------------------------------------------------------------------
import turtle
def draw_turtlr_square(t,sz):
for i in range(4):
t.forward(sz)
t.left(90)
t.stamp()
wn=turtle.Screen()
wn.bgcolor("lightgreen")
wn.title("turtle function")
alex=turtle.Turtle()
draw_turtlr_square(alex,255)
def draw_turtlr_square(t,sz,a):
for i in range(4):
t.forward(sz)
t.left(a)
t.stamp()
wn=turtle.Screen()
wn.bgcolor("lightgreen")
wn.title("turtle function")
alex=turtle.Turtle()
draw_turtlr_square(alex,255,90)
def draw_mc_sq(t,sz):
for i in ["red", "blue", "purple", "black", "orange"]:
t.color(i)
t.forward(sz)
t.left(90)
tess=turtle.Turtle()
tess.pensize(7)
size=177
for i in range (7):
draw_mc_sq(tess,size)
size=size+1
tess.forward(10)
tess.left(77)
wn.mainloop()