SlideServe
Menu
Préférences
© SlideServe · v2026

Variables

lethia avatar
5 diapositives · 221 Views · Jul 28, 2014

Discover the fundamentals of using variables in programming through engaging activities. Learn how to create and manipulate variables by utilizing the "Set" and "Change" commands to draw shapes based on variable values. This lesson allows you to explore variable-sized shapes by drawing polygons with different numbers of sides, such as triangles and octagons. Additionally, dive into the world of spirals by adjusting step sizes to create unique spirals. Get hands-on experience and enhance your coding skills while experimenting with different shapes and sizes.

Variables - slide 1
01 / 5Variables
1 / 17

Télécharger la présentation

Variables
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  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.