4 ms·
This is the first programming language I touched. Still missing REPEAT 5[FD 80 RT 144]
by azurezyq 6y ago
This is the first programming language I touched. Still missing REPEAT 5[FD 80 RT 144]
- rrherr 6y agoI 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 6y 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))