LogIn E-mail
설계이야기
[turtle]def polygon3(n,c,d)
# 19 JMJS    19.11.11 10:11

import turtle as t

def move(x,y):
    t.penup()
    t.goto(x,y)
    t.pendown()

def fun1(c,d):
    t.color(c)
    t.begin_fill()
    for a in range(3):
        t.left(360/3)
        t.forward(d)
    t.end_fill()

def fun2(c,d):
    t.color(c)
    t.begin_fill()
    t.circle(d)
    t.end_fill()

def fun3(n,c,d):
    t.color(c)
    t.begin_fill()
    for a in range(n):
        t.left(360/n)
        t.forward(d)
    t.end_fill()


t.speed(0)
n = 5

t.color("#00FF00")
t.begin_fill()
for x in range(10):
    move(x*30,x*30)
    fun2("blue",10)
   
for x in range(10):
    move(x*30,x*-20)
    fun3(x,"red",20)

게시물: 21 건, 현재: 1 / 1 쪽
번호 제       목 작성자 등록일 방문
22  python -m pip install -U pip JMJS 19.11.25 3
21  get =lambda i,m ... JMJS 19.11.13 7
20  2차원 리스트, 튜플 JMJS 19.11.13 6
19  [turtle]def polygon3(n,c,d) JMJS 19.11.11 8
18  [turtle]def polygon2(n,a) JMJS 19.11.11 7
17  def factorial(n) JMJS 19.11.11 7
16  def sum_func(n) JMJS 19.11.11 7
15  def hello() fun1(a) fun2(a,b) JMJS 19.11.11 6
14  while sum JMJS 19.11.11 6
13  random calculation JMJS 19.11.11 6
12  turtle random JMJS 19.11.11 6
11  import time time.time JMJS 19.11.11 6
10  turtle begin_fill end_fill JMJS 19.11.11 6
9  if else JMJS 19.11.11 7
8  input JMJS 19.11.11 7
7  list JMJS 19.11.11 6
6  turtle triangle JMJS 19.11.11 6
5  for range JMJS 19.11.11 6
4  모듈 사용하기 JMJS 19.11.11 8
3  import 파이썬 모듈 가져다 쓰기 JMJS 19.11.11 9
1  print 줄바꿈 JMJS 19.11.11 34
[1]