Menu

03 July 2010

Beautiful Kturtle Programming

--- Code 1 ----

<code>

reset

repeat 4 {

forward 100

turnright 45

repeat 90 {

forward 1

turnleft 4

}

turnright 45

}

go 0,0

</code>

--- Code 2 ---
<code>

reset

repeat 36 {

repeat 4 {

forward 100

turnright 45

repeat 36 {

forward 2

turnleft 10

}

turnright 45

}

forward 4

turnright 10

}

go 0,0


</code>


--- Code 3 ---
<code>

reset

repeat 12 {

forward 20

turnright 20

forward 30

turnright 10

backward 50

}

go 0,0

</code>

--- Code 4 ---
<code>

reset

repeat 36 {

repeat 4 {

forward 100

turnright 90

}

forward 10

turnright 10

}

go 0,0


</code>

--- Code 5 ---
<code>

reset

repeat 72 {

repeat 4 {

forward 100

turnright 90

}

forward 5

turnright 5

}

go 0,0


</code>


--- Code 6 ---
<code>

reset

repeat 72 {

repeat 5 {

forward 100

turnright 72

}

forward 5

turnright 5

}

go 0,0

</code>


--- Code 7 ---
<code>

reset

penup

forward 50

pendown

repeat 4 {

for $x = 1 to 100 {

forward 10

turnright $x

}

turnright 80

}

go 0,0

</code>


Posted via email from LUG@IITD Community Blog

Post a Comment