강의

로직 거북이는 총 6마리로 ["red", "orange", "yellow", "green", "blue", "purple"] 각각의 색깔을 갖는다 screen 의 사이즈는 500 x 400 이고 거북이가 x 축 왼쪽 끝에서 y 축 오른쪽 끝에 닿을 때 경기는 종료된다 경주 시작 전 input 으로 한 색깔을 고른다. 객체를 이용해 6마리의 거북이를 생성하고 경주 시키기 코드 # 거북이 경주 만들기 # def create_turtle(name, x, y): # color = colors.pop(0) # name = Turtle(shape="turtle") # name.penup() # name.goto(x, y) # name.color(color) # create_turtle("timmy", -230, 9..
Nowon9159
'강의' 태그의 글 목록