In [1]:
!pip3 install ColabTurtle
from ColabTurtle.Turtle import *
Collecting ColabTurtle Downloading ColabTurtle-2.1.0.tar.gz (6.8 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: ColabTurtle Building wheel for ColabTurtle (setup.py) ... done Created wheel for ColabTurtle: filename=ColabTurtle-2.1.0-py3-none-any.whl size=7642 sha256=213bcef08ad45ab1d5af6561359885d426a01649cbfba0abf668692008545c26 Stored in directory: /root/.cache/pip/wheels/5b/86/e8/54f5c8c853606e3a3060bb2e60363cbed632374a12e0f33ffc Successfully built ColabTurtle Installing collected packages: ColabTurtle Successfully installed ColabTurtle-2.1.0
In [2]:
initializeTurtle()
In [3]:
side_length = 150
angle = 360/4
for i in range(4):
forward(side_length)
right(angle)