-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvirus.py
More file actions
49 lines (42 loc) · 842 Bytes
/
virus.py
File metadata and controls
49 lines (42 loc) · 842 Bytes
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
import turtle
#============ !important ====================================
#reset()
#goto(x, y) => move the pen
#forward(distance)
#backward(distance)
#up() => remove the pen from the screen (stop drawing)
#down() => return the pen
#left(angle)
#right(angle)
#width(size) => like font-size
#fill(colorMaybe) => file a close part
#write("insert text")
#============================================================
# get the app
t= turtle.Turtle()
#get the screen
s=turtle.Screen()
#give the screen bg
s.bgcolor("black")
#speed of pen
t.speed(0)
#give the pen a color
t.pencolor("red")
t.write("Virus")
t.penup()
#replace the pen
t.goto(0,200)
t.pendown()
t.pencolor("green")
a=0
b=0
while True:
t.forward(a)
t.right(b)
a+=3
b+=1
if b==210:
break
# hide the pn cursor
t.hideturtle()
turtle.done()