Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/library/turtle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2778,7 +2778,7 @@ Changes since Python 3.0
:func:`Screen.numinput <numinput>`. These pop up input dialogs and return
strings and numbers respectively.

- Two example scripts :file:`tdemo_nim.py` and :file:`tdemo_round_dance.py`
- Two example scripts :file:`nim.py` and :file:`round_dance.py`
have been added to the :file:`Lib/turtledemo` directory.


Expand Down
2 changes: 1 addition & 1 deletion Lib/turtledemo/bytedesign.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" turtle-example-suite:

tdemo_bytedesign.py
turtledemo/bytedesign.py

An example adapted from the example-suite
of PythonCard's turtle graphics.
Expand Down
11 changes: 7 additions & 4 deletions Lib/turtledemo/chaos.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# File: tdemo_chaos.py
# Author: Gregor Lingl
# Date: 2009-06-24
""" turtle-example-suite:
# A demonstration of chaos
turtledemo/chaos.py
A demonstration of chaos
Author: Gregor Lingl
2009-06-24
"""
from turtle import *

N = 80
Expand Down
3 changes: 0 additions & 3 deletions Lib/turtledemo/clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

Enhanced clock-program, showing date
and time
------------------------------------
Press STOP to exit the program!
------------------------------------
"""
from turtle import *
from datetime import datetime
Expand Down
4 changes: 3 additions & 1 deletion Lib/turtledemo/colormixer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# colormixer
""" turtle-example-suite:
turtledemo/colormixer.py
"""
from turtle import Screen, Turtle, mainloop

class ColorTurtle(Turtle):
Expand Down
6 changes: 3 additions & 3 deletions Lib/turtledemo/forest.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
""" turtlegraphics-example-suite:
""" turtle-example-suite:
tdemo_forest.py
turtledemo/forest.py
Displays a 'forest' of 3 breadth-first-trees
similar to the one in tree.
For further remarks see tree.py
This example is a 'breadth-first'-rewrite of
a Logo program written by Erich Neuwirth. See
http://homepage.univie.ac.at/erich.neuwirth/
https://homepage.univie.ac.at/erich.neuwirth/
"""
from turtle import Turtle, colormode, tracer, mainloop
from random import randrange
Expand Down
4 changes: 2 additions & 2 deletions Lib/turtledemo/fractalcurves.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" turtle-example-suite:
""" turtle-example-suite:

tdemo_fractalCurves.py
turtledemo/fractalcurves.py

This program draws two fractal-curve-designs:
(1) A hilbert curve (in a box)
Expand Down
2 changes: 1 addition & 1 deletion Lib/turtledemo/lindenmayer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" turtle-example-suite:

xtx_lindenmayer_indian.py
turtledemo/lindenmayer.py

Each morning women in Tamil Nadu, in southern
India, place designs, created by using rice
Expand Down
5 changes: 1 addition & 4 deletions Lib/turtledemo/minimal_hanoi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" turtle-example-suite:

tdemo_minimal_hanoi.py
turtledemo/minimal_hanoi.py

A minimal 'Towers of Hanoi' animation:
A tower of 6 discs is transferred from the
Expand All @@ -12,9 +12,6 @@

Discs are turtles with shape "square", but
stretched to rectangles by shapesize()
---------------------------------------
To exit press STOP button
---------------------------------------
"""
from turtle import *

Expand Down
2 changes: 1 addition & 1 deletion Lib/turtledemo/nim.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" turtle-example-suite:

tdemo_nim.py
turtledemo/nim.py

Play nim against the computer. The player
who takes the last stick is the winner.
Expand Down
4 changes: 1 addition & 3 deletions Lib/turtledemo/paint.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" turtle-example-suite:

tdemo_paint.py
turtledemo/paint.py

A simple event-driven paint program

Expand All @@ -14,8 +14,6 @@
-------------------------------------------
Play around by clicking into the canvas
using all three mouse buttons.
-------------------------------------------
To exit press STOP button
-------------------------------------------
"""
from turtle import *
Expand Down
2 changes: 1 addition & 1 deletion Lib/turtledemo/peace.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" turtle-example-suite:

tdemo_peace.py
turtledemo/peace.py

A simple drawing suitable as a beginner's
programming example. Aside from the
Expand Down
6 changes: 3 additions & 3 deletions Lib/turtledemo/penrose.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" xturtle-example-suite:
""" turtle-example-suite:

xtx_kites_and_darts.py
turtledemo/penrose.py

Constructs two aperiodic penrose-tilings,
consisting of kites and darts, by the method
Expand All @@ -11,7 +11,7 @@
consisting of five darts.

For more information see:
http://en.wikipedia.org/wiki/Penrose_tiling
https://en.wikipedia.org/wiki/Penrose_tiling
-------------------------------------------
"""
from turtle import *
Expand Down
4 changes: 2 additions & 2 deletions Lib/turtledemo/planet_and_moon.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" turtle-example-suite:
""" turtle-example-suite:

tdemo_planets_and_moon.py
turtledemo/planets_and_moon.py

Gravitational system simulation using the
approximation method from Feynman-lectures,
Expand Down
2 changes: 1 addition & 1 deletion Lib/turtledemo/rosette.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" turtle-example-suite:

tdemo_wikipedia3.py
turtledemo/rosette.py

This example is
inspired by the Wikipedia article on turtle
Expand Down
5 changes: 1 addition & 4 deletions Lib/turtledemo/round_dance.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
""" turtle-example-suite:

tdemo_round_dance.py

(Needs version 1.1 of the turtle module that
comes with Python 3.1)
turtledemo/round_dance.py

Dancing turtles have a compound shape
consisting of a series of triangles of
Expand Down
12 changes: 4 additions & 8 deletions Lib/turtledemo/sorting_animate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
""" turtle-example-suite:

sorting_animation.py
turtledemo/sorting_animation.py

A minimal sorting algorithm animation:
Sorts a shelf of 10 blocks using insertion
Expand All @@ -10,9 +10,6 @@

Blocks are turtles with shape "square", but
stretched to rectangles by shapesize()
---------------------------------------
To exit press space button
---------------------------------------
"""
from turtle import *
import random
Expand Down Expand Up @@ -183,7 +180,6 @@ def enable_keys():
onkey(start_ssort, "s")
onkey(start_qsort, "q")
onkey(randomize, "r")
onkey(bye, "space")

def main():
getscreen().clearscreen()
Expand All @@ -195,8 +191,8 @@ def main():
listen()
return "EVENTLOOP"

instructions1 = "press i for insertion sort, s for selection sort, q for quicksort"
instructions2 = "spacebar to quit, r to randomize"
instructions1 = "press i for insertion sort, s for selection sort"
instructions2 = ", q for quicksort, r to randomize"

if __name__=="__main__":
msg = main()
Expand Down
2 changes: 1 addition & 1 deletion Lib/turtledemo/tree.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" turtle-example-suite:

tdemo_tree.py
turtledemo/tree.py

Displays a 'breadth-first-tree' - in contrast
to the classical Logo tree drawing programs,
Expand Down
4 changes: 3 additions & 1 deletion Lib/turtledemo/two_canvases.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""turtledemo.two_canvases
""" turtle-example-suite:

turtledemo/two_canvases.py

Use TurtleScreen and RawTurtle to draw on two
distinct canvases in a separate window. The
Expand Down
4 changes: 2 additions & 2 deletions Lib/turtledemo/yinyang.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" turtle-example-suite:
""" turtle-example-suite:

tdemo_yinyang.py
turtledemo/yinyang.py

Another drawing suitable as a beginner's
programming example.
Expand Down
Loading