4 ms·
I tried to figure this out with Python on https://colab.research.google.com/#create=true https://colab.research.google.com/#create=true Here's the closest I go
by rrherr 5y ago
I tried to figure this out with Python on https://colab.research.google.com/#create=true https://colab.research.google.com/#create=true
Here's the closest I got, but it's not pretty
!pip install ColabTurtle
from functools import partial as f
from ColabTurtle.Turtle import *
initializeTurtle()
def repeat(n, *commands):
for _ in range(n):
for command in commands:
command()
repeat(5, f(fd, 80), f(rt, 144))
- rrherr 5y agoActually this is better !pip install ColabTurtle from ColabTurtle.Turtle import * initializeTurtle() def repeat(n, *commands): for _ in range(n): for command in commands: fn, *args = command fn(*args) repeat(5, (fd, 80), (rt, 144))