import turtle as t
import random as r
t.Turtle()
t.shape('turtle')
n=5
t.color('black','red')
t.begin_fill()
t.pensize(5)
for j in range(1, 50):
x=r.randint(-400,400)
y=r.randint(-300,300)
t.up()
t.goto(x,y)
t.down()
l=r.randint(10,50)
re=r.randint(200,255)/255
ge=r.randint(200,255)/255
bl=r.randint(200,255)/255
#t.pencolor(re,ge,bl)
t.color((re,ge,bl),(re,ge,bl))
t.begin_fill()
for k in range(5):
t.fd(l)
t.lt(144)
t.end_fill()
t.pencolor('blue')
t.up()
t.goto(0,0)
t.write('경북소프트웨어고등학교', move=True, align='center', font=('a치어리더', 20, 'normal'))
t.pencolor('white')
t.down()
for i in range(1, 50):
r = 1
g = 1
b = (i*5)/255
t.pensize(i*1.5)
cl=(r,g,b)
t.pencolor(cl)
t.circle(100,5)
import turtle as t
import random as r
import PIL.Image as pilimg
import numpy as np
image=pilimg.open('rabbit.png')
image.show()
t.Turtle()
t.shape('turtle')
t.pensize(5) #펜굵기
for j in range(1, 50): #50개의 별 그리기
x=r.randint(-400,400) # 무작위 이동 X좌표
y=r.randint(-300,300) # 무작위 이동 y좌표
t.up()
t.goto(x,y)
t.down()
re=r.randint(200,255)/255 #RGB랜덤색상만들기
ge=r.randint(200,255)/255 #파스텔톤느낌주려고 200-255사이값
bl=r.randint(200,255)/255
t.color((re,ge,bl),(re,ge,bl)) # 선색, 채우기색
t.begin_fill()
l=r.randint(10,50) #램덤 크기 별
for k in range(5):
t.fd(l)
t.lt(144)
t.end_fill()
t.pencolor('blue')
t.up()
t.goto(0,0)
#글자쓰기
t.write('경북소프트웨어고등학교', move=True, align='center', font=('a치어리더', 20, 'normal'))
t.pencolor('white')
t.down()
# 달그림
for i in range(1, 50):
r = 1
g = 1
b = (i*5)/255
t.pensize(i*1.5)
cl=(r,g,b)
t.pencolor(cl)
t.circle(100,5)