Hallo Zusammen
Hab folgendes Problem:
BIn mit dem Buch Python Kids Python am Lernen. Bin dann bei Kapitel 2 nicht mehr weitergekommen weil man Turtle braucht.
Doch ich schaffe es nicht turtle zu instralieren.
Kann mir jemand genau erklären wie ich es instralieren muss?
MFG
FUNNYM4
Mac-TurtleGrafik
Der Apple Mac kommt mit Python, Tkinter und Turtle. Versuch mal die Idle App im Launchpad.
Ein typisches turtle Program ...
Ein typisches turtle Program ...
Code: Alles auswählen
''' turtle_pentagon_circle.py
turtle.circle(radius, extent=None, steps=None)
steps=5 --> pentagon
steps=3 --> triangle and so on
'''
import turtle as tu
tu.title('pentagon via circle')
# optional pen color (default is 'black')
tu.color('blue')
# optional pen width (default is 1)
tu.width(2)
# drawing a circle in 5 steps gives a pentagon
tu.circle(100, steps=5)
tu.color('green')
# drawing a circle in 3 steps gives a triangle
tu.circle(100, steps=3)
tu.color('red')
# steps=None (default) draws the normal circle
tu.circle(100)
# keep showing until window corner x is clicked
tu.done()
Atomkraftwerkaktienbesitzer