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.

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

Building a Conceptual Understanding of Algebra with Algebra Tiles
UNIT 8:FORMULA By: Grace Silverstein, and Samantha Stoeber!
Logo Lesson 1 TBE Fall 2004 Farah Fisher.
Computer Science 1000 LOGO I. LOGO a computer programming language, typically used for education an old language (1967) the basics are simple: move a.
EXAMPLE 2 Graphing Points in a Coordinate Plane SOLUTION Begin at the origin, move 4 units to the right, then 2 units down. Point A lies in Quadrant IV.
INTEGRALS Areas and Distances INTEGRALS In this section, we will learn that: We get the same special type of limit in trying to find the area under.
Logo Lesson 4 TBE Fall 2004 Farah Fisher. Prerequisites Create basic and complex shapes using Logo procedures Create Logo procedures that use variables.
Logo Lesson 5 TBE Fall 2004 Farah Fisher. Prerequisites  Given a shape, use basic Logo commands and/or a procedure to draw the shape, with and.
Bell Work: Quinn runs a sandwich shop
Lesson Topic: Problem-Solving and the Coordinate Plane
Logo Lesson 2 Logo Procedures
Lesson 1-1 Algebra Check Skills You’ll Need 1-5
Squares and Square Roots Students will be able to find square roots. Students will describe in writing what is meant by a perfect square. 4-5 Warm Up Warm.
Multiplying Whole Numbers Section 1.3. Objectives Multiply whole numbers Estimate the product of whole numbers Find the area of a rectangle.
VOLUME OF RECTANGULAR PRISMS. No tutoring tomorrow.
Year 8 Mathematics Area and Perimeter
Chapter 2 MEASURING, PERIMATER, AREA, GRAPHS By: Rain E. Burton and Alexia A. Bayer-Snyder.
Mathematics and ICT National Numeracy Strategy National Curriculum for Mathematics.
Midpoint and Distance in the Coordinate Plane.   Students will be able to…  Develop and apply the formula for midpoint.  Use the distance formula.
Estimating Square Roots The square root of a number is the value that, when multiplied by itself, gives the original number. 2 x 2 = 4 Square RootSquare.
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.
Relations & Functions (x,y)y) DR ID 1. Relations & Functions Test administrator: Before administration begins, show students the front of this card and.
Solving Radical Equations
INTEGRALS Areas and Distances INTEGRALS In this section, we will learn that: We get the same special type of limit in trying to find the area under.
B.A. (Mahayana Studies) Introduction to Computer Science November March Logo (Part 2) More complex procedures using parameters,
1 CSC 221: Computer Programming I Fall 2011 Fun with turtle graphics  turtle module  relative motion (setup, reset, left, right, forward, backward) 
A SIMPLE COMPUTER LANGUAGE LOGO. LOGO Introduction Logo is the simplest programming language. It.
MSW Logo By Awin 9s.
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.
Loops & Graphics IP 10 Mr. Mellesmoen Recall Earlier we wrote a program listing numbers from 1 – 24 i=1 start: TextWindow.WriteLine(i) i=i+1 If.
Logo Programming Fall 2011 – Session 7 Programming Class Teacher: M. Taghizadeh Sobhan Highschool.
EXAMPLE 2 Use the Midsegment Theorem In the kaleidoscope image, AE BE and AD CD. Show that CB DE. SOLUTION Because AE BE and AD CD, E is the midpoint of.
Mathematics Surface Area.
Performance Across the Bands. Algebra and Functions Algebra and Functions: Use letters, boxes, or other symbols to stand for any number in simple.
Introduction to Coordinate Proof
Area & Perimeter An Introduction. AREA The amount of space inside a 2-dimensional object. Measured in square units cm 2, m 2, mm 2 Example: 1 cm 2 cm.
The Number Line Lesson After completing this lesson, you will be able to say: I can locate a number and its opposite on a number line. I can determine.
Midterm: Question 1 (35%) (30 minutes) Write an assembly program to draw a rectangle. – (5%) Show a message to ask for information of the rectangle – (5%)
Reflections. Starter Objective: Recap on vertical & horizontal lines.
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.
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.
Perimeter and Area Formulas.  Perimeter is the distance around an object. It is easily the simplest formula. Simply add up all the sides of the shape,
In the last several lessons, you have described translations using coordinates. You have also developed strategies for determining where an object started.
Perimeter & Area. Today’s Objectives:  Learn what it means to find perimeter and area.  Practice finding or estimating the perimeter and area.
Search for it on your computer
LOGO WHAT IS IT? HOW TO USE IT AND HOW USEFUL CAN IT BE?
Patterns and Expressions Lesson 1-1
Holt Algebra Solving Radical Equations Warm Up(Add to Hw) Solve each equation. 1. 3x +5 = x + 1 = 2x – (x + 7)(x – 4) = 0 5. x 2.
Lesson 5.1, For use with pages
Copyright © Cengage Learning. All rights reserved. 4 Integrals.
In Exercises 1– 4, use A(0, 10), B(24, 0), and C(0, 0).
LOGO BY Kaotip 9S.
LOGO 32 By: Xenon 9S.
Lesson 7.6 Square, Squaring, and Parabolas
Young Scholars Program 2003
Translating Conic Sections
Learning to program with Logo
Graphing Absolute Value Equations
Algebraic Representations of Dilations
Using Algebra Tiles for Student Understanding
ALGEBRA TILES The University of Texas at Dallas.
Put your name, the date, and the period on your paper.
Introduction to TouchDevelop
Dividing Polynomials pages 664–666 Exercises 11. 3x – 1
The Distance and Midpoint Formulas
By- Sabrina,Julianna, and Killian
Translate, Rotate, Reflect!!!
Presentation transcript:

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 to make a shape. Create and edit a procedure. Use the following commands appropriately POTS SAVE LOAD

Objectives for Lesson 3 After completing this lesson, the student will be able to… Move the turtle to any screen position. Determine the turtle’s screen position. Explain the term variable. Create procedures with variable input, using MAKE and RANDOM.

Logo Screen Positions The position of the Logo turtle on the screen is described by two numbers - a horizontal and a vertical coordinate. The center of the screen is the turtle’s home. Its designation is [0 0], and all other coordinates are measured from there. It is very much like graphing in algebra.

Logo Screen Positions The first of the two numbers describes the horizontal distance in turtle steps right or left of the center. For example, in the position [10 15], the 10 represents 10 turtle steps to the right of the center. In the position [-25 10], the -25 represents 25 turtle steps to the left of the center.

Logo Screen Positions The second of the two numbers describes the vertical distance in turtle steps above or below the center. For example, in the position [10 15], the 15 represents 15 turtle steps above the center. In the position [25 -10], the -10 represents 10 turtle steps below the center.

Guess the Positions Make your best guess about the positions. Click to see the answers

Guess the Positions Possible screen positions (depending on Logo version) [ ] [ ] [0 -50] [ ]

Position Commands PR POS is the command used to print (in the command window) the current position of the turtle. SETPOS [number number] or SETXY (number number) sets the position of the turtle. SETX number changes only the first number SETY number changes only the second number HOME returns the turtle to [ 0 0 ]

Challenge What shape do you think would result from these commands (assume turtle starts at [0 0])? Click to see the answer. SETPOS [ 0 25 ] SETPOS [ ] SETPOS [ 25 0 ] SETPOS [ 0 0 ] or HOME

Challenge The commands make a square! [0 25][25 25] [25 0] [0 0]

Logo Variables A variable is a letter or word that represents a number that can vary (thus the term variable). In Logo, variables often have a colon in front of the letter or word. Sample Logo variables - :L2 :WIDTH :NAME :X

Logo Variables Variables must be assigned a value. The Logo command MAKE is often used to “fill up” a variable. For example, the command below puts the number 17 into the variable called :NUM (notice the quote and lack of colon) MAKE “NUM 17

Logo Variables See if you can determine the final value of :Z after the commands below. (NOTE: * means multiply, / means divide) MAKE “Z 25 MAKE “Z :Z * 2 MAKE “Z :Z + 10 MAKE “Z :Z / 2

Logo Variables :Z becomes 30 after several calculations. MAKE “Z 25 (:Z starts at 25) MAKE “Z :Z * 2 (:Z is multiplied by 2, :Z = 50) MAKE “Z :Z + 10 (10 is added to :Z, :Z = 60) MAKE “Z :Z / 2 (:Z is divided by 2, :Z = 30)

Logo Variables After you define the value of a variable, you can use it in Logo commands in place of any number. Examples: FD :X RT :D2 REPEAT 4 [ FD :SIZE RT 90 ]

RANDOM Logo variables can also be filled with random numbers. The RANDOM command returns a number from 0 to a set limit. Example: RANDOM 10 returns a number between 0 and 9. Example: 1 + RANDOM 100 returns a number between 1 and 100.

RANDOM Examples of MAKE with RANDOM MAKE “Z RANDOM 15 :Z becomes a number between 0 and 14 MAKE “H RANDOM 10 :H23 becomes a number between 1 and 10 MAKE “LENGTH 10 + RANDOM 50 :LENGTH becomes a number between 10 and 59 ( to )

Samples of Procedures with Variables (MAKE/RANDOM) A variable size SQUARE TO SQUARE MAKE “SIZE 10 + RANDOM 100 REPEAT 4 [FD :SIZE RT 90] END

Samples of Procedures with Variables (MAKE/RANDOM) A variable size TRIANGLE TO TRIANGLE MAKE “SIZE 25 + RANDOM 50 REPEAT 3 [FD :SIZE RT 120] END

Samples of Procedures with Variables (MAKE/RANDOM) A variable size RECTANGLE TO RECTANGLE MAKE “S RANDOM 50 MAKE “S RANDOM 100 REPEAT 2 [FD :S1 RT 90 FD :S2 RT 90] END

Another Way to Fill a Variable You can also fill up a variable by defining it when you “run” a procedure. Look at this procedure: TO SQUARE :S REPEAT 4 [FD :S RT 90] END Somehow, the :S needs a value.

Another Way to Fill a Variable To start this procedure… TO SQUARE :S REPEAT 4 [FD :S RT 90] END …you would type SQUARE 50 or SQUARE 100 or SQUARE 87 The number you type after the procedure name fills the variable.

Another Way to Fill a Variable Another example: TO TRIANGLE :F REPEAT 3 [FD :F RT 120] END To draw a triangle with sides of 50, type TRIANGLE 50 to start the procedure.

Another Way to Fill a Variable Consider this example: TO RECTANGLE :L :W REPEAT 2 [FD :L RT 90 FD :W RT 90] END You would need two numbers after the name of the procedure (the first becomes :L and the second becomes :W): RECTANGLE RECTANGLE 40 40

Self Check Lesson 3 In the screen below, what is the best estimate of the turtle’s position? [-50 50] [50 -50] [50 50] [ ]

Self Check Lesson 3 In the screen below, what is the best estimate of the turtle’s position? [-50 50] [50 -50] [50 50] [ ]

Self Check Lesson 3 Which of the following could not be the name of a Logo variable? :Z :The Size :SIZE :B123

Self Check Lesson 3 Which of the following could not be the name of a Logo variable? :Z :The Size{no spaces allowed} :SIZE :B123

Self Check Lesson 3 What will be the value of :BIG after the Logo commands below? MAKE “BIG 5 MAKE “BIG :BIG + 25 MAKE “BIG :BIG - 7

Self Check Lesson 3 What will be the value of :BIG after the Logo commands below? MAKE “BIG 5{:BIG=5} MAKE “BIG :BIG + 25{:BIG=30} MAKE “BIG :BIG - 7{:BIG=23}

Self Check Lesson 3 Suppose you want a randomly chosen number between 1 and 10. Which of the following would generate that number? RANDOM 10 RANDOM RANDOM

Self Check Lesson 3 Suppose you want a randomly chosen number between 1 and 10. Which of the following would generate that number? RANDOM 10{0 TO 9} RANDOM {10.0 TO } RANDOM

Self Check Lesson 3 Suppose you have entered the procedure below. What would you type to use it to draw a SQUARE with sides of 50? TO SQUARE :X REPEAT 4 [FD :X RT 90] END SQUARE SQUARE 50 TO SQUARE 50

Self Check Lesson 3 Suppose you have entered the procedure below. What would you type to use it to draw a SQUARE with sides of 50? TO SQUARE :X REPEAT 4 [FD :X RT 90] END SQUARE SQUARE 50 TO SQUARE 50

Try Some Exercises Practice with procedures at Check out screen positions at Try the hand-on exercise at