Procedures and Variables Control Logo 1. What you will do today  You will make your code more efficient by using procedures  You will create shapes.

Slides:



Advertisements
Similar presentations
First of all – lets look at the windows you are going to use. At the top you have a toolbar, with all your various tools you can use when customising your.
Advertisements

Dimensioning Dimensioning Gateway To Technology®
BELLWORK SINGLE POINT PERSPECTIVE
Quadrilaterals By Mr. Bales Objective By the end of this lesson, you will be able to identify, describe, and classify quadrilaterals. Standard 4MG3.8.
First things first – open SketchUp. You may be asked to choose a ‘Template’ For everyday use, choose the Simple Template – Meters Do not choose the Template.
Drinks Bottle Using CREO DEVELOPMENT
Using Logo and Logic Please use speaker notes for additional information!
Logo Lesson 3 TBE 540 Fall 2004 Farah Fisher. Prerequisites for Lesson 3 Before beginning this lesson, the student must be able to… Use simple Logo commands.
Logo Lesson 2 Logo Procedures
2D shapes.
Scratch Understanding some programming techniques using Scratch Resetting, Parallelism and Events.
Special Right Triangles 45:45:90 Right Triangles.
HOMEWORK & Learning Goal
Triangle Town Hi, I’m Elke. Pleased to be your guide through Triangle Town. Don’t ever worry about getting lost. I’ll stay with you the whole time.
LOGO SOFTWARE BY: SAVE 9S. INTRODUCTION Logo is a software that can be found at : Shared area> High School > ICT > take home software > LOGO32. This is.
> 1 Diagrams in Word Faculty of Health Alan Grace.
 Review  Created our own motion block called “draw square”  Used script to create a square with side lengths of 100 steps.
MSW Logo By Awin 9s.
Logo For beginners By Dali Matthews 9S What is logo?
An introduction to Logo Mike Warriner Engineering Director, Google Note: This course is not an endorsement of Logo by Google. All views in this document.
Logo Programming Fall 2011 – Session 4 Programming Class Teacher: M. Taghizadeh Sobhan Highschool.
CONTROL SYSTEMS Control Systems A command is a directive that performs a specific task An argument is a variable that can be used by the function reveiving.
5th Grade Valued Skulls experiment with line, shape and pattern, the art elements The OBJECTIVES are to: Experiment with line to develop controlled skill.
Today we will be learning: to make models accurately to build solid shapes from cubes by following instructions.
Logo Programming Fall 2011 – Session 7 Programming Class Teacher: M. Taghizadeh Sobhan Highschool.
To begin click: File, New, then select Design Familiarize yourself with the controls on the page. Then use the maximise button the make the window fill.
Homework 3 Can you divide 36 balls into 9 groups such that each group has odd number of balls? 36 ÷ 9 = 4, 4 is even What if we change things around a.
How to Create a Chapter Overview…. Expectations for Each Chapter Overview… 1.Hold the paper so the long side goes left to right.
Day 2 –Procedures Do now 1.Turn your introduction in to the TA. 2.Get out a new sheet of paper for the procedures. IN YOUR GROUPS (QUIET TALKING)
By Liam Lane How To Use MSW LOGO.
4.7 – Square Roots and The Pythagorean Theorem Day 2.
World 1-1 Pythagoras’ Theorem. When adding the areas of the two smaller squares, a2a2 Using math we say c 2 =a 2 +b 2 b2b2 c2c2 their sum will ALWAYS.
Logo for Beginners By Chris 9S.
Sequencing How to get better. Getting better – Level 3 Putting Instructions in a Sequence You can put instructions into a sequence You understand that.
HOW THEY WORK AND WHAT THEY DO. Jay Jay 9S. A control program is a type of programming that allows you to control systems. Control programs are used in.
Perspective Drawings Linear perspective is a geometric method of representing the apparent diminishing of scale as the distance from object to viewer increases.
First of all – lets look at the window’s you are going to use. At the top you have a toolbar, with all your various tools you can use when customising.
PYTHAGOREAN THEOREM TRIPLES. integers A "Pythagorean Triple" is a set of positive integers, a, b and c that fits the rule: a 2 + b 2 = c 2 Example: The.
Search for it on your computer
LOGO WHAT IS IT? HOW TO USE IT AND HOW USEFUL CAN IT BE?
What is it? How to use it and how useful can it be?
Do Now 5/11/10 Copy HW in your planner. Copy HW in your planner. –Text p. 740, #4-22 evens, #34 In your notebooks, simplify the following expressions.
CompSci 4 Java 4 Apr 14, 2009 Prof. Susan Rodger.
Module 2: Investigation 2
Computer Programming.
Two views Here are two views of the same shape made up of coloured cubes. How many cubes are there in the shape? What’s the minimum number? Maximum number?
Name: Aimee McLaughlin
Using Logo to develop logical thinking
LOGO BY Kaotip 9S.
LOGO 32 By: Xenon 9S.
Micro worlds Microworlds By Clara Paton By Clara Paton.
Puzzle A Puzzle B.
Exploring Mathematical Relationships Module 5: Final Challenge
Learning to program with Logo
Computer Programming.
What shape am I? I am a plane shape. I have 4 sides.
Using logical reasoning to detect and correct errors in algorithms
Reflection across y=x of P(3,5), Q(5,2), and R(-1,12)
Mod 2 Lesson 2 Repeating Debugging
Mod 2 Lesson 2 Repeating with loops
Using Logo and Logic This presentation uses a version of Logo called StarLogo available through MIT. It can be downloaded for free and installed on your.
Turn to Page S.89 Challenging Question
2D shapes.
FM2 Section A Planning Workshop
Shapes.
Symmetry.
2D Shapes Rectangle Circle Triangle Rectangle. What shape is the door? Rectangle.
Introduction to Computer Science
2D shapes.
Presentation transcript:

Procedures and Variables Control Logo 1

What you will do today  You will make your code more efficient by using procedures  You will create shapes using variables by changing the length variables ( )  You will create a house using shapes by changing sizes(variables) especially the length of the shape  You will create a robot for homework using shapes. 2

A Square - inefficiency  This code will make a square, but it is inefficient when it comes to repeating the command to make, for example, 10 squares  Pd  Fd 100  Rt 90  Fd 100  Rt 90  Fd 100  Rt 90  pu The inefficiency occurs because we have made one square but we still have to make another 9! If you did not know any better, you would have to copy and paste this code another 9 times to make 10 shapes. This is time consuming and inefficient 3

One Square with our inefficient code 4

A Square – efficient  To make the code work for us better, we start to make the code more efficient and introduce procedures that will have variables.  A Variable is ?  Have a guess what is a variable, you have come across it in Spreadsheets and you have hopefully come across it in maths! 5

An efficient Square continued  We have to know our maths to make our code better, especially how shapes work.  There are how many sides in a square?  Of course, 4!  4x4 sides make a square 6 Length is variable. It can be 100 or 200 or any number you want.

Introducing the length variable  Now you have a square, you can make many squares that are all different sizes.  Code you now know is inefficient To square Repeat 4 [fd 100 rt 90] End This code will only make a length of 100. What if we want to make 4 squares but each one is and 250 units long? 7

 With this knowledge we set the square to be 4 sides and we tell logo to build this for us  Code  To Square: repeat 4 [fd 100 rt 90]  Here we have said our shape has 4 sides and we are to go fd 100 with each side and rt 90 with each angle x 4 8

Where are the Variables?  Can you see where our variables are? To Square: repeat 4 [fd 100 rt 90] 9 Is it here?

Where are the Variables?  Can you see where our variables are? To Square: repeat 4 [fd 100 rt 90] 10 Is it here?

Where are the Variables?  Can you see where our variables are? To Square: repeat 4 [fd 100 rt 90] 11 Is it here?

Where are the Variables?  Can you see where our variables are? To Square: repeat 4 [fd 100 rt 90 ] 12 All these numbers are variables. All can be changed at any given time to create: 1. A bigger shape 2. to create a brand new shape!  Can you see where our variables are? To Square: repeat 4 [fd 100 rt 90 ]

 You can see that 100 is a variable  Now, if we leave the code with 100, it is not very useful.  So the variable : Length will help us create a procedure for logo to call up the square and the :length variable will allow us to define how big we want each square to change to:  E.g. 100 to

Now Variable: Length Here is the code, type it in logo TO SQUARE :length REPEAT 4 [FD :length RT 90] END Now call the procedure square 100 square 200 What did you notice? Write up what you noticed and how easy it is to define a variable length! 14

The Triangle TO TRIANGLE :length REPEAT 3 [FD :length RT 120] END  Make your triangle  Is your triangle the right way up to make a roof?  Adjust the code to get a triangle with the base on the bottom and the apex at the top!  If you get it the right way up, share the code in your learning page, well done! 15

Build your house  Your house needs to look like this Make your house 100 length Make your door appear somewhere in the middle. Put your triangle on the top for a roof! Make a rough plan in your notebooks to help you if you don’t get it first time! First person who gets it, has the credit! If you have used the variable length, fantastic! 16

Extension  If you have finished making your house  Colour the door in brown  Colour the main house green  Make the roof red  How about making a bigger house by calling a larger variable compared to your first house in the length section?  Copy and paste your code to your learning page. And explain how you found your colours, what problems you had.  Did you keep the black fill on the edges or were you able to change the fill so that no black pen edges showed? 17

Today you have learnt  Write two new things you learnt today you did not know before  You may think about the following  That variables are helpful in procedures by making code more efficient.  Something you have learnt yourself from today that you did not know 18

Homework Robot – create a Robot as close as You can to this One! 19