@@ -358,18 +358,18 @@ Turtle motion
358
358
.. doctest ::
359
359
:skipif: _tkinter is None
360
360
361
- >>> tp = turtle.pos()
362
- >>> tp
363
- (0.00,0.00)
364
- >>> turtle.setpos(60 ,30 )
365
- >>> turtle.pos()
366
- (60.00,30.00)
367
- >>> turtle.setpos((20 ,80 ))
368
- >>> turtle.pos()
369
- (20.00,80.00)
370
- >>> turtle.setpos(tp)
371
- >>> turtle.pos()
372
- (0.00,0.00)
361
+ >>> tp = turtle.pos()
362
+ >>> tp
363
+ (0.00,0.00)
364
+ >>> turtle.setpos(60 ,30 )
365
+ >>> turtle.pos()
366
+ (60.00,30.00)
367
+ >>> turtle.setpos((20 ,80 ))
368
+ >>> turtle.pos()
369
+ (20.00,80.00)
370
+ >>> turtle.setpos(tp)
371
+ >>> turtle.pos()
372
+ (0.00,0.00)
373
373
374
374
375
375
.. function :: setx(x)
@@ -919,23 +919,23 @@ Color control
919
919
.. doctest ::
920
920
:skipif: _tkinter is None
921
921
922
- >>> colormode()
923
- 1.0
924
- >>> turtle.pencolor()
925
- 'red'
926
- >>> turtle.pencolor(" brown" )
927
- >>> turtle.pencolor()
928
- 'brown'
929
- >>> tup = (0.2 , 0.8 , 0.55 )
930
- >>> turtle.pencolor(tup)
931
- >>> turtle.pencolor()
932
- (0.2, 0.8, 0.5490196078431373)
933
- >>> colormode(255 )
934
- >>> turtle.pencolor()
935
- (51.0, 204.0, 140.0)
936
- >>> turtle.pencolor(' #32c18f' )
937
- >>> turtle.pencolor()
938
- (50.0, 193.0, 143.0)
922
+ >>> colormode()
923
+ 1.0
924
+ >>> turtle.pencolor()
925
+ 'red'
926
+ >>> turtle.pencolor(" brown" )
927
+ >>> turtle.pencolor()
928
+ 'brown'
929
+ >>> tup = (0.2 , 0.8 , 0.55 )
930
+ >>> turtle.pencolor(tup)
931
+ >>> turtle.pencolor()
932
+ (0.2, 0.8, 0.5490196078431373)
933
+ >>> colormode(255 )
934
+ >>> turtle.pencolor()
935
+ (51.0, 204.0, 140.0)
936
+ >>> turtle.pencolor(' #32c18f' )
937
+ >>> turtle.pencolor()
938
+ (50.0, 193.0, 143.0)
939
939
940
940
941
941
.. function :: fillcolor(*args)
@@ -968,17 +968,17 @@ Color control
968
968
.. doctest ::
969
969
:skipif: _tkinter is None
970
970
971
- >>> turtle.fillcolor(" violet" )
972
- >>> turtle.fillcolor()
973
- 'violet'
974
- >>> turtle.pencolor()
975
- (50.0, 193.0, 143.0)
976
- >>> turtle.fillcolor((50 , 193 , 143 )) # Integers, not floats
977
- >>> turtle.fillcolor()
978
- (50.0, 193.0, 143.0)
979
- >>> turtle.fillcolor(' #ffffff' )
980
- >>> turtle.fillcolor()
981
- (255.0, 255.0, 255.0)
971
+ >>> turtle.fillcolor(" violet" )
972
+ >>> turtle.fillcolor()
973
+ 'violet'
974
+ >>> turtle.pencolor()
975
+ (50.0, 193.0, 143.0)
976
+ >>> turtle.fillcolor((50 , 193 , 143 )) # Integers, not floats
977
+ >>> turtle.fillcolor()
978
+ (50.0, 193.0, 143.0)
979
+ >>> turtle.fillcolor(' #ffffff' )
980
+ >>> turtle.fillcolor()
981
+ (255.0, 255.0, 255.0)
982
982
983
983
984
984
.. function :: color(*args)
@@ -1007,12 +1007,12 @@ Color control
1007
1007
.. doctest ::
1008
1008
:skipif: _tkinter is None
1009
1009
1010
- >>> turtle.color(" red" , " green" )
1011
- >>> turtle.color()
1012
- ('red', 'green')
1013
- >>> color(" #285078" , " #a0c8f0" )
1014
- >>> color()
1015
- ((40.0, 80.0, 120.0), (160.0, 200.0, 240.0))
1010
+ >>> turtle.color(" red" , " green" )
1011
+ >>> turtle.color()
1012
+ ('red', 'green')
1013
+ >>> color(" #285078" , " #a0c8f0" )
1014
+ >>> color()
1015
+ ((40.0, 80.0, 120.0), (160.0, 200.0, 240.0))
1016
1016
1017
1017
1018
1018
See also: Screen method :func: `colormode `.
@@ -1034,11 +1034,11 @@ Filling
1034
1034
.. doctest ::
1035
1035
:skipif: _tkinter is None
1036
1036
1037
- >>> turtle.begin_fill()
1038
- >>> if turtle.filling():
1039
- ... turtle.pensize(5 )
1040
- ... else :
1041
- ... turtle.pensize(3 )
1037
+ >>> turtle.begin_fill()
1038
+ >>> if turtle.filling():
1039
+ ... turtle.pensize(5 )
1040
+ ... else :
1041
+ ... turtle.pensize(3 )
1042
1042
1043
1043
1044
1044
@@ -1244,11 +1244,11 @@ Appearance
1244
1244
.. doctest ::
1245
1245
:skipif: _tkinter is None
1246
1246
1247
- >>> turtle.shape(" circle" )
1248
- >>> turtle.shapesize(5 ,2 )
1249
- >>> turtle.shearfactor(0.5 )
1250
- >>> turtle.shearfactor()
1251
- 0.5
1247
+ >>> turtle.shape(" circle" )
1248
+ >>> turtle.shapesize(5 ,2 )
1249
+ >>> turtle.shearfactor(0.5 )
1250
+ >>> turtle.shearfactor()
1251
+ 0.5
1252
1252
1253
1253
1254
1254
.. function :: tilt(angle)
@@ -1617,11 +1617,11 @@ Window control
1617
1617
``"nopic" ``, delete background image, if present. If *picname * is ``None ``,
1618
1618
return the filename of the current backgroundimage. ::
1619
1619
1620
- >>> screen.bgpic()
1621
- 'nopic'
1622
- >>> screen.bgpic("landscape.gif")
1623
- >>> screen.bgpic()
1624
- "landscape.gif"
1620
+ >>> screen.bgpic()
1621
+ 'nopic'
1622
+ >>> screen.bgpic("landscape.gif")
1623
+ >>> screen.bgpic()
1624
+ "landscape.gif"
1625
1625
1626
1626
1627
1627
.. function :: clear()
@@ -2028,16 +2028,16 @@ Settings and special methods
2028
2028
2029
2029
Return the height of the turtle window. ::
2030
2030
2031
- >>> screen.window_height()
2032
- 480
2031
+ >>> screen.window_height()
2032
+ 480
2033
2033
2034
2034
2035
2035
.. function :: window_width()
2036
2036
2037
2037
Return the width of the turtle window. ::
2038
2038
2039
- >>> screen.window_width()
2040
- 640
2039
+ >>> screen.window_width()
2040
+ 640
2041
2041
2042
2042
2043
2043
.. _screenspecific :
@@ -2218,12 +2218,12 @@ facilities:
2218
2218
in the range 0..colormode or a 3-tuple of such numbers.
2219
2219
2220
2220
2221
- >>> screen.bgcolor("orange")
2222
- >>> screen.bgcolor()
2223
- "orange"
2224
- >>> screen.bgcolor(0.5,0,0.5)
2225
- >>> screen.bgcolor()
2226
- "#800080"
2221
+ >>> screen.bgcolor("orange")
2222
+ >>> screen.bgcolor()
2223
+ "orange"
2224
+ >>> screen.bgcolor(0.5,0,0.5)
2225
+ >>> screen.bgcolor()
2226
+ "#800080"
2227
2227
2228
2228
>>> help(Turtle.penup)
2229
2229
Help on method penup in module turtle:
0 commit comments