CircuitPython turtle rainbow benzene: A New video by Adafruit Industries
CircuitPython turtle rainbow benzene
import board
import time
from Adafruit_CircuitPython_turtle.adafruit_turtle import *
turtle = turtle(board.DISPLAY)
benzsize = min(board.DISPLAY.width, board.DISPLAY.height) * 0.5
print(“Turtle time! Lets draw a rainbow benzene”)
colors = (Color.RED, Color.ORANGE, Color.YELLOW, Color.GREEN, Color.BLUE, Color.PURPLE)
while True:
turtle.pendown()
for x in range(benzsize):
turtle.pencolor(colors[x%6])
turtle.forward(x)
turtle.left(59)
time.sleep(1)
turtle.penup()
turtle.home()
turtle.clear()
#circuitpython #madewithmu #turtle
