본문 바로가기

Python_Beginer/Turtle

Python - for 문 활용하여 정사각형 만들기

반응형

<정사각형>


1.  for 문 활용 정사격형 만들기

import turtle as t

t.shape('turtle')

for i in range(4):
t.forward(100)
t.right(90)


2. 실행화면


반응형