-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCap_Shield(new).py
84 lines (57 loc) · 1.26 KB
/
Cap_Shield(new).py
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
# Captain America Shield
from turtle import Turtle, Screen
from math import *
from random import *
def kordinata():
global kx, ky
kx = randint(-400, 400)
ky = randint(-300, 300)
if kx**2 + ky**2 <= 150**2:
kordinata()
# def nuqta():
# nuq = Turtle()
# nuq.color(ranglar[randint(0,8)])
# nuq.shape('circle')
# nuq.speed(0)
# nuq.shapesize(0.05)
# nuq.penup()
# kordinata()
# nuq.goto(kx, ky)
def aylana(a, b):
top = Turtle()
top.shape('circle')
top.shapesize(a)
top.color(b)
top.goto(0, 0)
def yulduz(a):
global q
yul = Turtle()
yul.pencolor('white')
yul.fillcolor('white')
yul.hideturtle()
yul.penup()
yul.speed(0)
yul.goto(0, a)
yul.begin_fill()
yul.pendown()
yul.goto(a*cos(radians(-54)), a*sin(radians(-54)))
yul.goto(a*cos(radians(162)), a*sin(radians(162)))
yul.goto(a*cos(radians(18)), a*sin(radians(18)))
yul.goto(a*cos(radians(234)), a*sin(radians(234)))
yul.goto(0, a)
yul.end_fill()
def main():
global q, ranglar
oyna = Screen()
oyna.bgcolor('black')
ranglar=['yellow','green', 'black', 'grey', 'orange', 'white', 'brown', 'pink', 'magenta']
aylana(15, 'red')
aylana(12, 'white')
aylana(9, 'red')
aylana(6, 'blue')
a = 60
yulduz(a)
# for i in range(1000):
# nuqta()
oyna.mainloop()
main()