The Python 90° Turtle

Our Python Turtle instruction set of the day:

 (1) turn 90° to the right

(2) read the first unread digit « d » of the sequence S

(3) advance straight on for « d » units

(4) go to instruction (1)

When S is the « Decimal expansion of Pi », you get this (first 10,000 digits): 

When S is the « Decimal expansion of the Champernowne constant », you get this (first 200 digits, then first 10,000): 

When S is the especially designed sequence explained here, your walk will look like the succession of S's terms (a quine):

 Many, many thanks and cheers to Carole Dubois!


 

 

Commentaires

Enregistrer un commentaire

Posts les plus consultés de ce blog

A square for three (chess)

Le tripalin se présente

Some strings au cinéma Galeries