Presentation is loading. Please wait.

Presentation is loading. Please wait.

This way, this way … Lesson 3. Starter START Print “Hello, world” STOP Print “What’s your name?” Read in name Print “Hi” and the name Print “Welcome to.

Similar presentations


Presentation on theme: "This way, this way … Lesson 3. Starter START Print “Hello, world” STOP Print “What’s your name?” Read in name Print “Hi” and the name Print “Welcome to."— Presentation transcript:

1 This way, this way … Lesson 3

2 Starter START Print “Hello, world” STOP Print “What’s your name?” Read in name Print “Hi” and the name Print “Welcome to Logo START STOP

3 Starter TO HelloWorld PRINT [Hello, world] END TO Hello PRINT [What’s your name?] MAKE “name READWORD PRINT [Hi, ] PRINT :name PRINT [Welcome to Logo] END START Print “Hello, world” STOP Print “What’s your name?” Read in name Print “Hi” and the name Print “Welcome to Logo START STOP

4 Getting to the activity sheet 1.Go to Start > Internet 2.Go to Departments > Information Technology, Lessons > Year 8 3.Scroll down to and click on ‘GameGirl’ 4.Click on Lesson 3 5.Underneath Activity 2, click on ‘Hello, World’

5 To do You must –Make a program to print the words “Hello, World” –Modify that program to print whatever words you want. –Draw a square as big as you want and as many times as you want You should –Use a subroutine to draw the square of whatever size you want and as many times as you want –Use the FOR command You could –Do the same as above except for an octagon of whatever size you want

6 Hello, World! TO HelloWorld PRINT [Hello, World] END TO hello MAKE "name READWORD PRINT [hi, ] PRINT :name PRINT [, welcome to LOGO.] END TO message :text PRINT :text END

7 Repeating squares TO repeatingsquares PRINT [how many squares do you want?] MAKE "numberofsquares readword PRINT [how big do you want your squares?] MAKE "size READWORD REPEAT :numberofsquares [~ REPEAT 4 [FORWARD :size RIGHT 90] RIGHT 90 FORWARD :size LEFT 90 ] END

8 Using the SQUARE subroutine TO repeatsquares PRINT [How many squares?] MAKE "repeats READWORD PRINT [How big do you want them?] MAKE "size READWORD REPEAT :repeats [~ square :size RIGHT 90 FORWARD :size LEFT 90 ] END TO square :size REPEAT 4 [FORWARD :size RIGHT 90] END

9 Using FOR The square subroutine stays the same. The repeatsquare subroutine starts off the same. Replace the REPEAT command with: FOR [i 0 :repeats 1] [~ square :size RIGHT 90 PENUP FORWARD :size + 1 LEFT 90 PENDOWN ]

10 Doing the same thing with octagons There are only a few changes which need to be made to the program in the “should” section to draw octagons instead. Here’s a clue: TO octagon :size … END And another one: replace ‘square’ with ‘octagon’.


Download ppt "This way, this way … Lesson 3. Starter START Print “Hello, world” STOP Print “What’s your name?” Read in name Print “Hi” and the name Print “Welcome to."

Similar presentations


Ads by Google