E-Pen InMotion E-Pen Manual do Utilizador

Consulte online ou descarregue Manual do Utilizador para Medição, teste e controlo E-Pen InMotion E-Pen. Variables Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 15
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 0
Scratch Programming Class
Ronald Bourret
http://www.rpbourret.com/scratch
This document is available under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA
4.0) license. See the last page of this document for more information.
Lesson 5: Variables
Terminology: A variable is a place where you store a value for later use. For example, you might save the x and y coordinates of a
sprite so that it can return to its original position.
Note that you have already been using variables, such as x position and y position in Motion. These are variables that Scratch
maintains for you. In this lesson, we will be creating and using our own variables.
Starmaking Machinery, Part 1
1. Log in to Scratch (http://scratch.mit.edu) and click on Create.
2. Click Costumes, delete one of the costumes, and erase the other. Draw a simple pencil and set the center of the sprite to the point
of the pencil.
3. Click Scripts, click Events, and drag when green flag clicked to the scripts area.
4. Click Control, add a forever block and place an if-then block inside it. Click Sensing and set the if condition to mouse down?.
5. Click Pen and place a clear block and a set pen color to block inside the if-then block. Click on the color in the set pen color to
block and then click on a color elsewhere on the screen that you like.
6. Click Control and add a repeat 12 block after the set pen color to block.
7. Inside the repeat 12 block, add the following blocks:
a. go to x: y: (Motion), with x set to mouse x and y set to mouse y. You can find mouse x and mouse y in Sensing.
b. pen down (Pen)
c. point in direction (Motion), with the direction set to direction + 30. You can find the + operation in Operators and
direction in Motion.
d. move 40 steps (Motion)
e. pen up (Pen)
f. wait .5 secs (Control)
8. Click the green flag and click somewhere on the stage. Do not move the mouse after you click. The script will draw a star by
drawing 12 lines from the place you clicked in twelve different directions. After each line, it moves back to the center of the star.
9. Name your project Starmaking Machinery and save it.
Vista de página 0
1 2 3 4 5 6 ... 14 15

Resumo do Conteúdo

Página 1 - Scratch Programming Class

Scratch Programming Class Ronald Bourret http://www.rpbourret.com/scratch This document is available under the Creative Commons Attribution-NonCommerc

Página 2 - Starmaking Machinery, Part 2

Dizzy: Hyperspace 1. At the bottom of the when green flag clicked script, add a new prompt to ask how fast the figure should spin: fast (f), medium (

Página 3 - Banana Splat, Part 1

More projects: Calculator 1. Build a simple calculator. 2. Prompt the user for a number, an operation, and another number. Store these values in var

Página 4 - Banana Splat, Part 2

Spiralitudity 1. It is possible to draw a curve from a series of short, straight line segments. If the angle between segments and the segment length

Página 5

Fibonacci Numbers 1. Leonardo Fibonacci (aka Leonardo Pisano Bigollo, Leonardo of Pisa, Leonardo Pisano, Leonardo Bonacci) was a 13th century Italian

Página 6

Primates do Primes 1. Ask the user how many primes they want. Calculate as many primes as the user wants and display a list of them. Remember that 1

Página 7

License This document is available under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license. Under

Página 8 - Dizzy: Counterdizzywise

Starmaking Machinery, Part 2 1. Click the green flag and click on the stage again, but this time move your mouse after you click. What happened? Do y

Página 9 - Dizzy: Spin Cycle

Banana Splat, Part 1 1. Create three sprites: a stick figure named Thrower, a banana named Banana, and a bird named Bird. Make two costumes for the b

Página 10 - Dizzy: Hyperspace

Banana Splat, Part 2 1. By now, you are probably arguing with your friends about who is better at chucking bananas at birds. The only way to solve th

Página 11 - Calculator

Frogs, Cannonballs, and Flying Fruit, Part 1 1. It’s time to start throwing things: frogs, cannonballs, flying fruit. The trajectory of flying object

Página 12 - Spiralitudity

Frogs, Cannonballs, and Flying Fruit, Part 2 1. Of course, not everything has the same trajectory. When you throw a superball into the air, it goes w

Página 13 - Fibonacci Numbers

Dizzy 1. Create a new project with two costumes: a stick figure dog walking and a stick figure dog chasing its tail (see picture below). Don’t worry

Página 14 - Primates do Primes

Dizzy: Counterdizzywise 1. Remove the when green flag clicked block and replace it with a when I receive Spin block. 2. Under the when green flag cl

Página 15 - License

Dizzy: Spin Cycle 1. At the bottom of the when green flag clicked script, add a new prompt to ask how many turns the stick figure should take. Set th

Comentários a estes Manuais

Sem comentários