MrW's Computing Blog

Lessons and links for Computing at St Mark's
  • News
    • Termly Overviews
  • ONLINE SAFETY
    • ICT agreement
    • Online safety videos and podcasts
    • Online safety links
  • Forms
    • Online Safety Survey 25
    • How did that go?
    • Questions
    • My Computing Skills
    • How do I…?
    • Info form
    • End of unit reflection
  • Logins
    • Typing.com
    • J2launch
    • Google Classroom
    • Google Apps
  • Resources
    • LOGO programming
    • Child friendly search engines
    • Great comments
    • Keyboard, mouse and typing skills
    • Music for media projects
    • Video tutorials
    • How to blog
    • BBC bitesize computing
    • Doorway Online
    • LOGO activities
      • LOGO tutorial videos
    • Useful tools
    • Other stuff
      • Memory training
    • Scratch game toolkit 1
  • MrWs Maths
    • Y4 Multiplication Check
    • Times |Tables.co.uk
  • Galleries
    • Animations gallery
    • Audio Gallery
    • Film gallery
    • j2e gallery
    • LOGO gallery
    • Presentation gallery
    • Robot gallery
    • eSafety gallery
    • Scratch gallery
    • Showcase blog
  • Values for learning
  • Contact me
  • Parents
  • Mr W’s DT Blog

Y56 LF: The power of procedures with variables

Dec 082019
 
  • Start a new project in LOGO
  • Copy this code (copy and paste)

reset
setpensize 5

to rect :h :w :x :y
pu setxy :x :y pd
repeat 2 [fd :h rt 90 fd :w rt 90]
end

  • Now you can draw any size rectangle anywhere on the page by typing:
    • rect 30 60 100 -50
  • The first two numbers and the height and width
  • The second two numbers are the x-coordinate and y-coordinate
    • The page goes from
      • -250 to 250 left to right
      • -250 to 250 bottom to top
  • MAke a picture out of rectnangles
  • ** Add a colour variable to the procedure
  • ** Add another variable, eg
    • pensize
    • angle (dn’t forget to change the angle back again)
    • make it a parallelogram (one angle :ang, other angle (180 – :ang)  )

Khan academy drawing activity using JavaScript

  •  8th December 2019
  •  Posted by Mr W at 9:13 am
  •   No Responses
  •   News
  •  Tagged with: coding, j2code, LOGO, Y5, Y5T2, Y6, Y6T2

Y6 LF: LOGO project

Nov 222019
 

Think of all the things you can draw in LOGO:

  • Lines = fd 50 or bk 50
  • Turns = rt 90 or lt 90 (or other angles)
  • Circles = circle 50
  • Squares = repeat 4 [fd 50 rt 90]
  • Shapes =  repeat ? [fd 50 rt 360/?] (/ means divide; ? means number of sides)
  • Stars = repeat ? [fd 50 rt 360 /? -180] same as shapes but change the angles; ? bigger than 8
  • Spirals = see last post for Y5
  • Colours = colour “blue
  • Moving without drawing = pu setxy 100 100 pd
  • Shading = fill (fills the area you are in with the current colour)
  • Pen thickness = setpensize 5
  • Procedures = to newthing …instructions… end
  • Procedures with variables = to newthing :size :col …. end
  • Call procedure with variables = newthing 50 “blue
  • Make/change  variables = make  “length 50
  • Use variables = fd :length
  • Increase variables = make “length :length + 1

Your task

  • Design and draw a picture with different elements (could doa uick sketch in j2e5).
  • Use as many skills from the list above as you can
  • You can copy and paste code from your previous projects
  • Lavel your code with comment lines starting with semi colon ; ,eg
    • ;———-Wheel———–

Ideas

  • A car or vehicle
  • A robot
  • A house or building

 

  •  22nd November 2019
  •  Posted by Mr W at 8:51 am
  •   No Responses
  •   News
  •  Tagged with: coding, j2code, LOGO, Y6, Y6T2

Y5 LF: Drawing a picture in LOGO

Nov 222019
 

Think of all the things you can draw in LOGO:

  • Lines = fd 50 or bk 50
  • Turns = rt 90 or lt 90 (or other angles)
  • Circles = circle 50
  • Squares = repeat 4 [fd 50 rt 90]
  • Shapes =  repeat ? [fd 50 rt 360/?] (/ means divide; ? means number of sides)
  • Stars = repeat ? [fd 50 rt 360 /? -180] same as shapes but change the angles; ? bigger than 8
  • Spirals = see last post
  • Colours = colour “blue
  • Moving without drawing = pu setxy 100 100 pd
  • Shading = fill (fills the area you are in with the current colour)
  • Pen thickness = setpensize 5
  • Procedures = to newthing …instructions… end
  • Make/change  variables = make  “length 50
  • Use variables = fd :length
  • Increase variables = make “length :length + 1

Your task

  • Design and draw a picture with different elements (could doa uick sketch in j2e5).
  • Use as many skills from the list above as you can
  • You can copy and paste code from your previous projects
  • Lavel your code with comment lines starting with semi colon ; ,eg
    • ;———-Wheel———–

Ideas

  • A car or vehicle
  • A robot
  • A house or building

 

  •  22nd November 2019
  •  Posted by Mr W at 8:45 am
  •   No Responses
  •   News
  •  Tagged with: coding, j2code, LOGO, Y5, Y5T2

Y5 LF: Use variables to draw spirals

Nov 152019
 

Warm up

  • Read learning conversations, correct code
  • Typing

Recap

  • Following instructions….
  • Variables
  • 360/:sides
  • setxy
  • Efficient code

Success steps

  • Follow instructions
  • Try to understand why it works
  • Debug by yourself
  • Tinker with your code
  • Copy and paste images to a j2e5 page

Let’s go: What is a spiral?

  1. Start a new LOGO file
  2. Type: reset setpensize 5
  3. Save it as spiral
  4. Lets set up two variables:
    1. make “sides 4
    2. make “length 30
  5. Copy this code:
    1. repeat 10
    2. [
    3. fd :length rt 360/:sides
    4. ]
    5. Play – it should just draw a square over itself a few times
      1. To make it a spiral, we need to make the length longer each time.
    6. Put the following code at the end but before the ] bracket:
      1. make “length :length + 10
    7. This should draw a spiral…if not, debug
  6. Tinker:  Try:
    1. different values of “sides at the start
    2. increase the repeat number
    3. changing how much you add to  “length in step 5.3
    4. adding a new variable called “pen (make “pen 3) then add these lines in the repeat brackets:
      1. setpensize :pen
      2. make “pen :pen + 1
    5. Right hand click each spiral and copy and paste it into a j2e5 page to show what spirals you have made.
    6. Create a page with at least 6 spirals on

Finished?

In a new LOGO file, type this simple code, play it then tinker with it…

reset
repeat 250 [forward repcount rt 89]

  •  15th November 2019
  •  Posted by Mr W at 1:30 pm
  •   No Responses
  •   News
  •  Tagged with: coding, j2code, LOGO, Y5, Y5T2

Y6 LF: Procedures in LOGO

Nov 122019
 

You may copy and paste code from these instructions to save time typing.

Start a new LOGO file
Type:
    reset
    setpensize 5

Copy the following PROCEDURE:

    to snowflake
    repeat 6 [fd 20 bk 20 rt 60]
    end

Now whenever you want to draw a snowflake, you just have to write snowflake  rather than typing all of the code for a snowflake.  The code above is called a PREOCEDURE – it teaches the computer a new word and what it means.

Try this

    snowflake
    repeat 10 [snowflake fd 20 rt 36]

Why did we use the numbers 10 (for repeat) and 36 (for the right turn)?

You can also add a VARIABLE to a procedure.  Change the snowflake procedure to this:

    to snowflake :size
    repeat 6 [fd :size bk :size rt 60]
    end

Now when you call snowflake, you need to put a number with it, which will be how big it is.

Try this:

snowflake 50

snowflake 100

You can add other variables to the snowflake too.  Change the procedure to this:

to snowflake :size :col :pensize
   colour :col
   setpensize :pensize    
   repeat 6 [fd :size bk :size rt 60]
end

Then type for example:   snowflake 60 “blue 10

Let’s make a snowstorm…

Copy this code:

repeat 100
[
pu setxy (250 – random 500) (250 – random 500) pd
snowflake random 50 “blue random 15
]

Now tinker, play, experiment…

You could add this after the reset: colour “blue fill then make your snowflakes white

  •  12th November 2019
  •  Posted by Mr W at 11:46 am
  •   No Responses
  •   News
  •  Tagged with: coding, j2code, LOGO, Y6, Y6T2

Y5 LF:Use variables to draw different shapes

Nov 112019
 

Warm up

  • Check work from last week – have I left you a learning conversation?  Can you fix/finish something?   Ask if not sure.
  • Typing

Get started

1. Start a new LOGO page.  Type:

    reset
    setpensize 5

3. Draw a square:

    repeat 4 [fd 50 rt 90]

4. What do the numbers mean in this code?  4?  50?   90?

5. How could we change the numbers to get a different shape?  A triange?  A pentagon?  A hexagon?  Have a go and see what happens.

6. Type this code:

    make “sides 6
    repeat :sides [fd 50 rt 360/:sides]

7. sides is called a VARIABLE – we can change it to be any number.

8. Change the 6 to a 5 and play again.  Try some different numbers.

9.  Use this code to move to different places on the page:

    pu setxy 100 100 pd

Numbers can be from -250 to 250 (0 0 is in the middle)

10.  Can you make something like this picture – different shapes spread around the page?

11.  Think carefully: for each shape, you need lines of code for

– move to a different place
– change the variable
– draw the shape

(You can copy and paste lines of code to save time typing)

  •  11th November 2019
  •  Posted by Mr W at 11:23 am
  •   No Responses
  •   News
  •  Tagged with: coding, j2code, LOGO, Y5, Y5T2

Y3 How do I program in LOGO?

Nov 102019
 
  1. j2launch – 
  2. Click on Level 3 
  3. Type reset
  4. This code draws a single step like the one below:
    • fd 30
    • rt 90
    • fd 30
    • lt 90
  5. Press play – you should get this: ScreenHunter_08 Nov. 07 09.29
  6. Now add this to your code:
    • pu
      setxy -200 50
      pd
  7. Challenge 1:  Make this shape by typing more instructions: ScreenHunter_10 Nov. 07 09.32
  8. Now add this to your code:
    • pu
      setxy 130 100
      pd
  9. Challenge 2: Now make a square:  ScreenHunter_11 Nov. 07 09.37
  10. Now add this to your code:
    • pu
      setxy -140 -140
      pd
  11. Challenge 3:  ScreenHunter_12 Nov. 07 09.44
  12. Now add this to your code:
    • pu
      setxy 140 – 140
      pd
  13. Challenge 4: ScreenHunter_13 Nov. 07 09.50

The final picture should look like this:

ScreenHunter_17 Nov. 21 09.57

Is there any way we could make our code simpler?  Some of the algorithms repeat instructions.

Success steps:

  • Copy instructions carefully
  • Press play to run program
  • Make instructions to draw simple shapes including forward, left and right
  • Check instructions carefully for mistakes (bugs)

If you have finished, try working through these debugging challenges!

And if you finish that…!  Start a new file and start with this code.

  • reset
  • setpensize 5

Can you draw a letter?  ~(Diagonal letters will need rt 45 or lt 45)

 

 

  •  10th November 2019
  •  Posted by Mr W at 10:13 am
  •   No Responses
  •   News
  •  Tagged with: coding, j2code, LOGO, Y3, Y3T2

Y5 Debugging in LOGO

Nov 022019
 

LOGO bug challenges

  1. Go to My files – Shared files – st-marks-wilts-sch-ujk – LOGO debugging
  2. Open logo bug challenge 1 – correct the code – you should get a spiral and a message when you press play
  3. Repeat with logo bug challenges 2 and 3

Squares

  • Go to j2code – LOGO – level 3
  • Type this:

reset
setpensize 5

  • Type the following to draw a square.

repeat 4 [fd 50 rt 90]

  • Can you explain why this draws a square?
  • Change the code so that the suqare is:
    • twice as big
    • half the size
    • has only three sides drawn, like this 

Using variables

  • After setpensize 5, add a line (using return key)
  • Type this:

make “length 50

  • Now change your square code, swapping the fd number for :length

repeat 4 [fd :length rt 90]

  • Try changing the number in the make “length line of code
  • Now make you whole code look like this:

reset
setpensize 5
make “length 50
repeat 10
[
repeat 4 [fd :length rt 90]
make “length :length + 10
]

  • Can you explain it?
  • Play with it – try changing some numbers to make more squares, smaller differences
  • Challenge – can you make it do this just by changing the length starting number and how much it changes?
  •  2nd November 2019
  •  Posted by Mr W at 3:03 pm
  •   No Responses
  •   News
  •  Tagged with: debugging, LOGO, variablesj2code, Y5, Y5T2

Y3 JIT5 Turtle

Oct 232019
 
  1. j2launch – JIT5 – Turtle
  2. Big bad wolf
    1. Make the wolf visit the three houses
  3. Space
    1. Visit each of the planets
  4. Desert adventure
    1. Get to the pond without touching prickly cactus
  5. Cars
    1. Reverse the car into a single space
  6. Flowers
    1. Visit each of the flowers

  • use the arrows
  • see the code
  • press play 

  • use the arrows (character doesn’t move)
  • see the code
  • press play 
  • send character back to start 
  • to delete code 
  •  23rd October 2019
  •  Posted by Mr W at 10:31 am
  •   No Responses
  •   News
  •  Tagged with: coding, JIT5, LOGO, Y3, Y3T2

Gradients in j2e5

Oct 092019
 
  •  9th October 2019
  •  Posted by Mr W at 8:25 am
  •   No Responses
  •   News
 Older Entries  Newer Entries

Years and terms

T1 T2 T3 T4 T5 T6
Y3 Y3T1 Y3T2 Y3T3 Y3T4 Y3T5 Y3T6
Y4 Y4T1 Y4T2 Y4T3 Y4T4 Y4T5 Y4T6
Y5 Y5T1 Y5T2 Y5T3 Y5T4 Y5T5 Y5T6
Y6 Y6T1 Y6T2 Y6T3 Y6T4 Y6T5 Y6T6

 

Tags

animate coding CoronaVirus create creative data database DTP Google hyperlinks iMovie Internet iPad j2code j2e j2e5 j2e101 JIT JIT5 LOGO maths Music science scratch sliding block puzzles Y3 Y3T2 Y3T4 Y3T6 Y4 Y4T1 Y4T3 Y4T5 Y4T6 Y5 Y5T1 Y5T2 Y5T3 Y5T5 Y6 Y6T1 Y6T2 Y6T3 Y6T4 Y6T5

St Mark’s website

Recent Posts

  • Y4 Scratch maze
  • Y5 How can I create an effective book cover?
  • Y6 Last Computing session
  • ICT quizzes
  • Logic puzzles

Who has visited our site?

Flag Counter

See the Space Station!

Log in
© 2020 MrW's Computing Blog Suffusion theme by Sayontan Sinha