Programming76 turtle.pencolor() 함수 [ turtle.pencolor() 함수 예제 - 1 ] # Python.Help Document.turtle Module 부분 참고할 것. # # Python v.3.8.6의 경우, # Python Editor 모드 / Menu / Help / Python Docs (단축키는 F1.) / 색인탭 / # 키워드 'turtle'로 검색 / turtle module 선택. 더블 클릭. / Pen control / Color control / #/ # color() : 단순히 색상만 결정함. # pencolor() : 거북이 도형의 펜 선 색상을 결정함. # fillcolor() : 거북이 도형의 면색을 결정함. # # 기타 관련 함수. 일단은 이것만 있어도 될 듯. # turtle.begin_fill() #.. 2023. 12. 10. LOGO : Animation - 001 LOGO Animation 예제 - 1 : Animation from JD8 Theme. 중급 이상 고급 예제입니다. Animation을 보여주기 위해 꼭 필요한 최소한의 수정만을 거쳐서 모범적인 코드 가이드를 따르지 않는 부분도 있습니다만 그게 핵심은 아닌지라 그대로. 코드 실행 중에라도 cs 명령을 입력해 진행 과정을 조금 바꿀 수도 있습니다. to 144box repeat 12 [ line move2] pu fd 300 pd end to box repeat 4 [ fd 20 rt 90 ] end to cord fl_co wait 1 de_co move4 end to de_co pe circle 5 ppt setfloodcolor random 15 ;; White, Originally. fill pu.. 2023. 10. 15. LOGO : 별 그리기(Drawing Star) - 001 1. Introduction FMSLogo 프로그램을 이용해서 Logo 언어로 별을 그려보겠습니다. 기초 학습용이라 코드 중복 문제는 고려하지 않습니다. 2. Code to goLeft ;; // home call시 방향은 어디.. pu home lt 90 fd 490 rt 180 pd end to main ;; // Q. 1. 첫 줄의 rt 90의 효용 가치를 평가하세요. cs st rt 90 goLeft repeat 5 [ star1 pu fd 150 pd ] ht end to star1 ;; // 더 단축 가능할까.. repeat 5 [ fd 50 lt 72 fd 50 rt 144 ] end 3. 결과 Result 4. 첨부 파일 Files 간단한 코드라 첨부 파일은 생략. Logo에서는 main .. 2023. 9. 27. [ L2P ] 재귀 : 다른 방식의 루프 반복의 다른 방법, 재귀를 연습해보겠습니다. import turtlettlWin = turtle.Screen()ttlWin.tracer(0,0)# 그리기 속도 개선. 결과 빨리 보기# (n Frame num., delay time millisec.)t1 = turtle.Pen()count = 0def box1(): for i in range(4): t1.fd(50) t1.rt(90)def move1(): t1.pu() t1.rt(90) t1.fd(70) t1.lt(75) # 15도 줄여서 회전각 만들기. t1.pd()def run(): global count #required # count = 0 # 주의. # 초.. 2023. 9. 24. 이전 1 ··· 15 16 17 18 19 다음