python 3 turtle 질문

2020-09-29 (화) 14:13:27 2,539

이 문제 답좀 알려주세요 ㅠㅠ

# 7) Use the turtle module and the example slide of code from lecture 6 to make a grid of circles.

# Modify the code so that instead of making a square grid, it makes a triangle shaped grid. See the assignment page for

# an example result. This can be done with only a small change to the nested loops - find that small change way

# to solve this.

example slide:

import turtle

window = turtle.Screen()

worker = turtle.Turtle()

worker.speed(0)#Go fast

for x in range(-200,200,50):

   for y in range(-200,200,50):

       worker.penup()

       worker.setposition(x,y)

       worker.pendown()

       worker.circle(20)

 window.exitonclick()

32350545_1601356395.5765.png

|

답변 1개

파이썬 커뮤니티로 가시는게 좋을듯 합니다.ㅠㅠ

답변을 작성하려면 로그인이 필요합니다.