1 / 5

Variables

Variables. Making variables. Click on the variables tab and click "Make a variable". Set vs. Change. Set and Change look the same but are slightly different in what they do Set [ variableName ] to [number] Sets the variable to whatever the number is Change [ variableName ] by [number]

lethia
Download Presentation

Variables

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Variables

  2. Making variables • Click on the variables tab and click "Make a variable"

  3. Set vs. Change • Set and Change look the same but are slightly different in what they do • Set [variableName] to [number] • Sets the variable to whatever the number is • Change [variableName] by [number] • Adds whatever the number is to the variable

  4. Variable Sized Shapes • We want you to combine what you've learned about variables and shapes to fill in the blank below. • The program should draw a shape with a different number of sides based upon the value of a variable. For example, if the variable sides was 3, it would draw a triangle, if it was 8, it would draw an octagon. • For this, we need someOperators. Look in the Operators tab to see theones you can use

  5. Drawing Spirals • If you continue to repeat while changing the size of the steps, you can create spirals • Use either the Set block or the Change block to change the size of the step after drawing a side. Use this to create a spiral. • This is a squiral (square+spiral).Experiment with differentnumbers to create other spirals.

More Related