Presentation is loading. Please wait.

Presentation is loading. Please wait.

Logo Programming Fall 2011 – Session 4 Programming Class Teacher: M. Taghizadeh Sobhan Highschool.

Similar presentations


Presentation on theme: "Logo Programming Fall 2011 – Session 4 Programming Class Teacher: M. Taghizadeh Sobhan Highschool."— Presentation transcript:

1 Logo Programming Fall 2011 – Session 4 Programming Class Teacher: M. Taghizadeh Sobhan Highschool

2 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure In the first lesson, we taught the turtle how to draw a square. We ended up with a procedure that looks like this: TO SQUARE REPEAT 4 [ FD 100 RT 90 ] END

3 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Squares of Any Size TO SQUARE REPEAT 4 [ FD 100 RT 90 ] END 100 ?

4 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Squares of Any Size FD 100 RT 135 BK 32 LT 75... 100 135 32 75 PARAMETER

5 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Squares of Any Size SQUARE 100SQUARE 75SQUARE 250

6 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Squares of Any Size TO SQUARE :LENGTH REPEAT 4 [ FD :LENGTH RT 90 ] END

7 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Squares of Any Size TO SQUARE :LENGTH REPEAT 4 [ FD :LENGTH RT 90 ] END PARAMETER

8 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Squares of Any Size SQUARE 100SQUARE 75SQUARE 250

9 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Squares of Any Size TO FUNCTION_NAME :PARAMETER...... (:PARAMETER)... END

10 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Squares of Any Size REPEAT 10 [ SQUARE REPCOUNT * 10 ]

11 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Squares of Any Size REPEAT 10 [ SQUARE REPCOUNT * 10 ] PARAMETER

12 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Squares of Any Size REPEAT 10 [ SQUARE REPCOUNT * 10 ] SQUARE 1 * 10 = SQUARE 10 SQUARE 2 * 10 = SQUARE 20 SQUARE 3 * 10 = SQUARE 30 SQUARE 4 * 10 = SQUARE 40 SQUARE 5 * 10 = SQUARE 50 SQUARE 6 * 10 = SQUARE 60 SQUARE 7 * 10 = SQUARE 70 SQUARE 8 * 10 = SQUARE 80 SQUARE 9 * 10 = SQUARE 90 SQUARE 10 * 10 = SQUARE 100

13 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Triangles of Any Size

14 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Triangles of Any Size TO TRI :LENGTH REPEAT 3[FD :LENGTH RT 120] END REPEAT 7 [ TRI REPCOUNT * 20 ]

15 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon N-EDGE: REPEAT N [FD 100 RT 360/N ] 3 120 4 90 5 72 6 60 8 45

16 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon TO POLYGON :SIDE REPEAT :SIDE [ FD 100 RT 360/:SIDE ] END

17 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon POLYGON 4POLYGON 5POLYGON 6POLYGON 8 100

18 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon TO POLYGON :SIDE :LENGTH REPEAT :SIDE [ FD :LENGTH RT 360/:SIDE ] END

19 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon TO POLYGON :SIDE :LENGTH REPEAT :SIDE [ FD :LENGTH RT 360/:SIDE ] END MULTIPLE PARAMETER

20 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon POLYGON 4 100POLYGON 5 20POLYGON 6 75POLYGON 8 120 100 20 75 120

21 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon Flower Number: 60 Polygon: 6-edge Repeat 60 [ Polygon 6 100 RT 60]

22 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon Flower Number: 10 Polygon: 8-edge Repeat 10 [ Polygon 8 100 RT 36]

23 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon Flower Number: 30 Polygon: 5-edge Repeat 30 [ Polygon 5 100 RT 12]

24 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon Flower Number: 18 Polygon: 60-edge Repeat 18 [ Polygon 60 25 RT 20]

25 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon Flower FLOWER: REPEAT N [ POLYGON..... RT 360/N]

26 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon Flower TO POLYGON :SIDE :LENGTH REPEAT :SIDE [ FD :LENGTH RT 360/:SIDE ] END TO POLYGONFLOWER :NUMBER :SIDE :LENGTH REPEAT :NUMBER [POLYGON :SIDE :LENGTH RT 360/:NUMBER] END

27 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Drawing Polygon Flower PolygonFlower 18 6 100 PolygonFlower 10 8 100 PolygonFlower 30 5 100 PolygonFlower 18 60 25

28 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Saving Drawings BitmapSave As

29 Teacher: M. Taghizadeh – Sobhan Highschool Logo Programming Procedure Change Pen Color, Pen Size, Color Screen Set Pen Size Pen Color Screen Color

30 Logo Programming Fall 2011 – Session 4 The End Teacher: M. Taghizadeh Sobhan Highschool


Download ppt "Logo Programming Fall 2011 – Session 4 Programming Class Teacher: M. Taghizadeh Sobhan Highschool."

Similar presentations


Ads by Google