repl.it
@NiclasOstlund/

DrabWorstBase

Python (with Turtle)

No description

fork
loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import turtle

min_skold = turtle

min_skold.goto(0, 0)
min_skold.pensize(10)
min_skold.pencolor("yellow")
min_skold.pendown()
min_skold.fillcolor(yellow)
min_skold.begin_fill()
for i in range(4):
  min_skold.forward(100)
  min_skold.right(90)
min_skold.end_fill()
min_skold.penup()











niclas.fillcolor("yellow")
niclas.begin_fill()
niclas.end_fill()





















"""import turtle

 def draw_square(t, sz):
     #Make turtle t draw a square of sz.
     for i in range(4):
         t.forward(sz)
         t.left(90)




 alex = turtle.Turtle()      # Create alex
 draw_square(alex, 50)       # Call the function to draw the square
 
turtle.done()

import turtle

def rita_kvadrat(namn,steg):

namn.begin_fill("red")
for i in range(4):
  namn.forward(steg)
  namn.right(90)

turtle.end_fill()
  return;



niclas = turtle

niclas.pencolor("red")
niclas.fillcolor("red")

rita_kvadrat(namn="niclas", steg=100)






#niclas.begin_fill()
#for i in range(4):
#  niclas.forward(50)
#  niclas.right(90)

#niclas.end_fill()

#niclas.goto(100,100)
#niclas.goto(-100,-100)
#niclas.goto(0,0)

#niclas.pencolor("yellow")
#niclas.fillcolor("yellow")
#niclas.begin_fill()
#for i in range(4):
#  niclas.forward(50)
#  niclas.right(90)

#niclas.end_fill()
"""

turtle.done()



result
console
?