Answers for "draw rectangle python -square"

2

python how to draw a square

import turtle
for i in range(4):
  turtle.forward(40)
  turtle.right(90)
Posted by: Guest on December-31-2020
1

python how to draw a rectangle

import turtle
for i in range(2):
  turtle.forward(20)
  turtle.right(90)
  turtle.forward(10)
Posted by: Guest on December-31-2020

Python Answers by Framework

Browse Popular Code Answers by Language