-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChristmas Picture.py
More file actions
121 lines (109 loc) · 2.1 KB
/
Christmas Picture.py
File metadata and controls
121 lines (109 loc) · 2.1 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Christmas Picture
from turtle import *
from random import *
from turtleaddon import *
##complete = False
##while complete != True:
## try:
bgcolor("Black")
'''
Name of Function -> snow()
Parameters ->
Return Value ->
What it does -> It makes a big white square that acts like snow.
'''
def snow():
fillcolor("white")
begin_fill()
speed(200)
for i in range(4):
forward(2000)
right(90)
forward(2000)
end_fill()
'''
Name of Function -> snowflakes()
Parameters ->
Return Value ->
What it does ->
'''
def snowflakes():
number = randint(5, 8)
speed(2000)
pencolor("white")
for i in range(number):
for i in range(number):
pendown()
forward(5)
left(45)
forward(5)
back(5)
right(90)
forward(5)
back(5)
left(45)
back(number * 5)
right(360/number)
penup()
'''
Name of function -> santa()
Parameters ->
Return Value ->
What it does ->
'''
def santa():
goto(0,0)
pencolor("red")
fillcolor("red")
begin_fill()
penup()
pendown()
circle(60)
end_fill()
goto(0,60)
penup()
right(360)
pendown()
rectange("black","black",5,60)
penup()
left(90)
left(90)
forward(5)
right(90)
pendown()
rectange("black","black",5,60)
penup()
left(90)
left(90)
forward(45)
right(90)
forward(15)
pendown()
pencolor("yellow")
fillcolor("yellow")
begin_fill()
circle(30)
end_fill()
snow()
santa()
penup()
for i in range(4):
number = randint(50,200)
goto(200,0)
forward(number)
left(90)
forward(number)
right(15)
forward(number)
## goto(-number,number)
pendown()
snowflakes()
complete = True
## except:
## print("An error occoured! Restarting the program.")
'''
Name of Funcation: chatclear()
'''
def chatclear():
for i in range(200):
print(" ")