# Import turtle package import turtle



Download 10,75 Kb.
Sana29.03.2022
Hajmi10,75 Kb.
#516869
Bog'liq
Kamalak


# Import turtle package
import turtle

# Creating a turtle screen object


sc = turtle.Screen()

# Creating a turtle object(pen)


pen = turtle.Turtle()

# Defining a method to form a semicircle


# with a dynamic radius and color
def semi_circle(col, rad, val):

# Set the fill color of the semicircle


pen.color(col)

# Draw a circle


pen.circle(rad, -180)

# Move the turtle to air


pen.up()

# Move the turtle to a given position


pen.setpos(val, 0)

# Move the turtle to the ground


pen.down()

pen.right(180)


# Set the colors for drawing
col = ['violet', 'indigo', 'blue',
'green', 'yellow', 'orange', 'red']

# Setup the screen features


sc.setup(600, 600)

# Set the screen color to black


sc.bgcolor('Blue')

# Setup the turtle features


pen.right(90)
pen.width(10)
pen.speed(7)

# Loop to draw 7 semicircles


for i in range(7):
semi_circle(col[i], 10*(
i + 8), -10*(i + 1))

# Hide the turtle


pen.hideturtle()
Download 10,75 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish