Nov 242017
 
  • Plan and create a picture in LOGO
  • Use
    • repeat
    • setxy
    • procedures (at the beginning)

Repeat

repeat
[
instructions
]

Double repeat – eg square of shapes

repeat 4
[
repeat
[
pattern code
]
rt 90
]

download (3)

Setxy

pu setxy 100 200 pd

Procedures

to thing
instructions for thing
end

thing

Variables

make “length 20

fd :length

Make “length :length + 1

Procedures with variables

to square :side   (don’t need to make “side)
fd :side rt 90
end

square 40

Can have more than one variable, eg

to shape :length :angle :col
repeat 4
[
colour :col
fd :length rt :angle
]

 

Lists

 

make “cols [“red “blue “purple]

item 3 :col

Success steps

  • Plan your shape (could draw it first eg in j2e5)
  • Type – Play – Think – Edit – Type – Play ….
  • Be resilient

Text

See this file

 Posted by at 8:09 am
Nov 242017
 

Start a new project with the following and save it as “y6logo 2”

  • reset
  • setpensize 5

Repeat task

  1. repeat 4 [fd 40 rt 90] draws a square:
    1. the instructions inside the [] “fd 40 rt 90” are the ones to do again and again
    2. the “4” means repeat it four times
  2. Copy the code above to draw a square
  3. Copy and paste the code again
  4. Try changing the 4 to a 5.  What happens?
  5. Now change the “rt 90” to “rt 72”
  6. Copy the code again
  7. Try changing repeat to 6 – what should the “rt” number be?
  8. Now try repeat 7: when you draw the shape, the total angle turned is 360 because it comes back to the beginning.  It has 7 equal angles so each angle needs to be….360…7
  9. Copy the code again
  10. Draw an Octagon (8-sided) and a Nonagon (9-sided)
  11. Save (if you haven’t already!)

Finished?  You should have on your page:

  1. A square, pentagon, hexagon, heptagon, octagon and nonagon

Setxy

  1. Setxy is used to move the arrow to a different position on the canvas
  2. setxy 50 100 sends the arrow to the coordinates (50, 100)
  3. This Scratch project shows you what the different coordinates are:
    1. x y coordinate finder (only goes up to 240/180 in Scratch – in LOGO it goes up to 250 on each axis)
  4. NOTE if the pen is down, it will draw a line to the new position – so it is quite useful to use with pu and pd:
    1. pu setxy 50 100 pd – will send it to the new place without drawing then is ready to draw
  5. Use “pu setxy …. pd” to move your shapes from the first section to different places on the canvas.

Procedures

  1. Procedures are used to avoid typing the same thing several times.
  2. Use a procedure if you need to repeat something in your picture, eg windows in a house, snowflakes, stars, a fence, stripes, eyes….
  3. A procedure teaches the computer how to do a shape but doesn’t draw it.  Then you “call” the procedure to make it draw it.
  4. Instead of “repeat 4 [fd 40 rt 90]” at the beginning of your code, have this:

to square
repeat 4 [fd 40 rt 90]
end

  1. When you play, it will not draw the square – you have only told it how to – not to actually draw it.
  2. Now type “square”  after the procedure and it should draw the square.  You have taught it how to draw a square!
  3. Procedure are usually all at the beginning of the code.
  4. Make procedures called “pentagon” and “hexagon”
  5. Instead of drawing one pentagon, use the code:  repeat 6 [pentagon rt 60] to make a pentagon flower!
  6. Make a procedure to fill your shape:
    1. to fillshape
      1. pu rt 45 fd 10
      2. fill
      3. bk 10 lt 45 pd
    2. end
  7. Call the procedure after each shape you do.

Variables

Lists

 

Success steps

  • Save (as) different versions
  • Experiment with new code
  • Find your own mistakes by reading your code carefully
  • Use repeat, setxy and procedures in your own code

download

 Posted by at 7:00 am
Nov 232017
 
  1. Create your single “squiggle” – instructions here
  2. Complete the REPEAT activity here
  3. Make your pattern smaller by dividing each fd and bk number, eg by 10
    1. OR use a scale variable like this:
      1. make “scale 10 (at beginning)
      2. After each fd or bk number, put /:scale
      3. eg  fd 50 –> fd 50/:scale
      4. Then change the number in  make “scale 10 until the squiggle is the right size
  4. Make the pattern fit round the whole canvas using instructions here from 6

Finished?

  • Create a different squiggle and put it inside your first pattern
  • Put squares inside and outside your pattern

download (5)

 Posted by at 8:04 am
Nov 222017
 
  1. Open this project:  Letter L
  2. Add repeat 4 [   BEFORE the L code
  3. Add  ] at the END
  4. It should do this: ScreenHunter_129 Nov. 13 11.13
  5. Tidy up the code by using return and spaces so it looks like this:
  6. ScreenHunter_130 Nov. 13 11.15
  7. Now put  repeat 4 [ before this code
  8. At the end, put  rt 90 ]
  9. Tidy up the code so it looks like this:
  10. ScreenHunter_131 Nov. 13 11.18
  11. It should look like this:
  12. download (1)
  • Can you write your own letter code (with a finger space) and do the same?
  • What happens if you make your code like this?
    • repeat 10 [   
    • your letter code   
    • rt 36 ]

Resources

Finished?

Carry on with LOGO letters 2 and 3…please ask for the sheet of instructions and the help videos are below:

  1. LOGO Letters 2
  2. LOGO Letters 3
 Posted by at 7:00 am
Nov 202017
 
  • Think of a simple picture with repeated elements, see here for examples.  Use LOGO to draw it!
  • You could sketch it in j2e5 first

Success steps 

  • Use repeat
  • Use setxy to move around the canvas
  • Keep you code tidy so it is easy to read
  • Be prepared to learn a new command – look on the blog for ideas
  • ** Use procedures for repeated elements – see this blog post
 Posted by at 10:03 am
Nov 162017
 
  1. j2e – j2code – LOGO
  2. Start with:  reset   setpensize 4

SQUARE

  1. Draw a square using the repeat command

SQUARE with VARIABLE

  1. To make a spiral, we need to increase the length each time it repeats.
  2. To do this we will make a variable called “length” that we can control.
  3. Before the square code, type: make “length 30
  4. Replace your fd 40  by fd :length
  5. Try your code – try changing the number after make “length to make different sized squares.

SPIRAL

  1.  Start with make “length 30
  2. Inside the repeat brackets put the following line:
  3. make “length :length +10
  4. NOTE the difference between “len and :len (“len is for changing it; :len is for using/calculating with it)
  5. Increase the number of repeats

What variations can you create?  Save different versions for each one you do.

 Posted by at 1:05 pm
Nov 142017
 
  • Go to j2code and click on LOGO
  • Make sure you are on Level 3
  • CHALLENGE:  Write instructions in LOGO to make this picture.ScreenHunter_15 Nov. 11 08.24

TIPS

  • Don’t get rid of your code!  That’s the important bit.
  • Keep pressing play (after every new command)
  • Keep saving
  • Useful commands
    • pu = pen up so it doesn’t draw
    • pd = so it draws again
    • setpensize 10 for a thicker line
    • circle 30 
    • arc 50 180 draws part of a circle
    • repeat 4 [fd 100 rt 90] for a square
    • pu setxy 50 60 pd to jump to a new place without drawing.  Here’s a Scratch program to help find which numbers to use – Positioin finder

SUCCESS STEPS

  1. Try new commands and ideas – be curious
  2. Type accurately
  3. Spot your own mistakes – be resilient
  4. Save (logo face) and tag (y5logo)

FINISHED?

Can you…

  • make it smile!
  • add some spiky hair using repeat, eg ScreenHunter_132 Nov. 14 08.02
  • change the shape of the right eye – a hexagon maybe…
  • add a spiral ear

FINISHED AGAIN?!

  • Start to design and create your own picture
  • use:  repeat, setxy, arc, circle, colour, fill
  • Can you use procedures at the beginning?

Next time…

  • Complete a challenge shape/picture using a range of commands
  • Think of a simple picture with repeated elements, see here for examples.  Use LOGO to draw it!

 

 

 Posted by at 7:02 am