Capitolul 3. Tempo. Variabile. Hat block

Set and Change (seteaza si schimba) Tempo Video

Intrebari

Care descrie actiunea “set”?

  1. Ignora valoarea anterioara a variabilei; DA
  2. Adauga un nou numar la tempo-ul curent.

Care descrie actiunea “change”?

  1. Ignora valoarea anterioara a variabilei;
  2. Adauga un nou numar la tempo-ul curent. DA

Uneori vrem sa cantam mai rapid sau mai lent. Putem schimba cat de repede sa fie redat cantecul prin modificarea numarului de batai (beats) pentru fiecare nota. Iata trei versiuni ale aceluiasi cantec:

Song A

a song where all play note blocks play for 0.5 beats

Song B

a song where all play note blocks play for 0.25 beats

Song C

a song where all play note blocks play for 1 beats

Care cantec este mai rapid? B

Care cantec este mai lent? C

Sa practicam utilizarea Tempo (Ritmul)

Pentru a practica utilizare lui Tempo, putem modifica un cantec gata facut.

Remixing in Scratch

Aici este un link cu un cantec gata facut. Dupa ce deschideti proiectul, dati click pe butonul “See Inside” din coltul dreapta-sus – bara albastra.

Se va afisa scriptul proiectului. Pentru a face o copie a proiectului si a-l modifica, dati click pe butonul “Remix” din coltul din dreapta-sus al ecranului – bara gri.

Acum poti edita cantecul!

Sa exploram tempo/ritmul

In tabul Sound/Sunet, gasiti blocul tempo/ritm si dati click in casuta de langa block. Acest lucru iti va permite sa vizualizezi valoarea tempo-ului/ritmului pe scena.

Incearca:

  • Utilizeaza blocul “set tempo” pentru a stabili tempo-ul/ritmul .
  • Schimbati tempo-ul la o valoare mai mare. Cum se aude cantecul?
  • Schimbati tempo-ul la o valoare mai mica. Cum se aude acum cantecul?

Sa modificam Tempo cu Set and Change Video

Intrebari

1. Care este valoarea tempo-ului dupa ce rulam acest script?

a set temp to 60 block followed by a change tempo by 30 block

Raspuns: 90

Explanation

The first block sets the tempo to 60. The second block changes the tempo by 30, so the tempo will be 60 + 30 = 90.

2. Care este valoarea tempo-ului dupa ce rulam acest script?
a set temp to 60 block followed by a change tempo by -20 block

Raspuns: 40

Explanation

The first block sets the tempo to 60. The second block changes the tempo by −20, so the tempo will be 60 − 20 = 40.

3. Care este valoarea tempo-ului dupa ce rulam acest script?
a set tempo to 60 block followed by a change tempo by -10 block, a change tempo by 20 block, a change tempo by 40 block, and a change tempo by -50 block

Raspuns: 60

Explanation

The first block sets the tempo to 60. The second block changes the tempo by −10, so the tempo will be 60 − 10 = 50. The third block changes the tempo by 20, so the tempo will be 50 + 20 = 70. The fourth block changes the tempo by 40, so the tempo will be 70 + 40 = 110. The fifth block changes the tempo by −50, so the final tempo is 110 − 50 = 60.

4. Care este valoarea tempo-ului dupa ce rulam acest script?
a set tempo to 60 block followed by a change tempo by 20 block, a change tempo by 20 block, and finally a set tempo to 60 block

Raspuns: 60

Explanation

The first block sets the tempo to 60. The second block changes the tempo by 20, so the tempo will be 60 + 20 = 80. The third block also changes the tempo by 20, so the tempo will be 80 + 20 = 100. The final block sets the tempo to 60, ignoring the previous value of tempo, so the final tempo is 60.

Sa schimbam Tempo cu blocul Repeat Video

Intrebari

1. Care este valoarea tempo-ului dupa ce rulam acest script?

Explanation

The first block sets the tempo to 60. Then we change the tempo by 5 ten times, so the tempo changes by a total of 5 × 10 = 50. Then the final value of tempo is 60 + 50 = 110.

2. Care este valoarea tempo-ului dupa ce rulam acest script?

Explanation

The first block sets the tempo to 60. Then the first repeat changes the tempo by 10 three times, so the tempo changes by 3 × 10 = 30. After the first repeat, the tempo is 60 + 30 = 90. The second repeat changes the tempo by −5 four times, so the tempo changes by 4 × −5 = −20. After the second repeat, the tempo is 90 − 20 = 70. The third repeat changes the tempo by 2 five times, so the tempo changes by 5 × 2 = 10. The final value of tempo is 70 + 10 = 80.

Sa modificam Tempo cu Repeats Video

Intrebari – modificarea Tempo-ului

Ce valoare are tempo-ul dupa ce dam dublu-click pe scriptul de mai jos?
Raspuns: 70

Explanation

The first block sets the tempo to 60. Then the third block changes the tempo by 10, so the final tempo is 60 + 10 = 70.

Ce valoare are tempo-ul dupa ce dam dublu-click pe scriptul de mai jos?

Raspuns: 70

Explanation

The first block sets the tempo to 60. Then, the repeat changes the tempo by 10 once, so the final tempo is 60 + 10 = 70.

Ce valoare are tempo-ul dupa ce dam dublu-click pe scriptul de mai jos?

Raspuns: 90

Explanation

The first block sets the tempo to 60. Then the repeat changes the tempo by 10 three times, so the tempo increases by 3 × 10 = 30. The final tempo is 60 + 30 = 90.

Ce valoare are tempo-ul dupa ce dam dublu-click pe scriptul de mai jos?

Raspuns: 260

Explanation

The first block sets the tempo to 60. Then the repeat change the tempo by 10 twenty times, so the tempo increase by 20 × 10 = 200. The final tempo is 60 + 200 = 260.

Ce valoare are tempo-ul dupa ce dam dublu-click pe scriptul de mai jos?

Raspuns: 20

Explanation

The first block sets the tempo to 60. Then the repeat block sets the tempo to 20 ten times, so the final tempo is 20.

Exercitiu: Sa modificam cat de repede se schimba Tempo-ul

In intrebari, am vazut script-urile care cresc tempo-ul.

Acum sa experimentam prin schimbarea tempo-ului de catre el insusi.

  • Faceti acest script in Scratch.
  • Faceti o alta versiune in care tempo-ul sa creasca mai rapid!
  • Faceti o alta versiune in care tempo-ul sa creasca mai lent!
  • Faceti o alta versiune in care tempo-ul intai sa creasca, apoi sa scada!
  • Faceti o alta versiune in care tempo-ul intai sa scada, apoi sa creasca!

Variabile

Utilizarea variabilelor in cantece Video

Ai localizat Bug-ul?

Este foarte complicat sa vezi bug-ul in acest video! Nu te ingrijora daca nu l-ai observat!

Primele doua script-uri canta notele 60, 61, 62, 63, 64, 65, 66, 67, 68, si 69. Scriptul care foloseste blocul Repeat, canta notele  61, 62, 63, 64, 65, 66, 67, 68, 69, si 70. Deci scriptul cu blocul Repeat incepe si si termina cu o nota mai tarziu decat celelalte doua script-uri. Acest lucru se numeste “off by 1 error” si este o eroare obisnuita.

Iti dai seama cum se repara eroarea?

Prin schimbarea ordinii celor doua blocuri in interiorul blocului Repeat. In loc sa avem “change note by 1” primul, il avem pe “play note note”.

O secventa de note – Video

Exercitiu: Sa cantam un cantecel

Suntem pe cale sa realizam un cantec, iar pentru aceasta vom realiza o noua variabila! Avem variabile deja construite in Scratch, cum ar fi Tempo. Acum ne vom face propria variabila!

  • Dati click pe “Data” tab si click “Make a variable.”
  • In meniul popup denumiti noua variabila, “my note”.
  • Acum vom avea un bloc pentru utilizarea noii variabile (asemenea blocului Tempo)
  • Faceti un script in care sa utilizati variabila  “my note.”
    Indicatie: priviti cat de asemanator este cu blocul Repeat care schimba Tempo!
  • Faceti un script care sa cante notele intre 60-100.

De ce ordinea conteaza in iteratii – Video

Exercitiu: Canta notele cu sot (pare)

Ai facut un script care canta toate notele intre 60 si 70, o data. Acum realizeaza un script care sa cante doar notele pare situate intre. Adica, 40, 42, 44, 46, … , 88, 90.

Exercitiu: In sus si in jos pe portativ

Realizati un script care sa cante notele de la 60 la 70 si inapoi pana la 60.

Exercitiu: Numaratoare inversa

Realizati un script care face sprite-ul sa numere invers de la 10 la 1. Utilizati o variabila numita  . Utilizati aceasi metoda pe care ati folosit-o pentru schimbarea Tempo-ului.

Indicatii:

  • trebuie sa folosesti blocul Repleat
  • trebuie sa folosesti aceasta piesa , care se gaseste in tabul “Looks” .
  • Inlocuieste “Hello!” cu variabila .
  • Exista trei modalitati de a face  sa descreasca cu cate 1 unitate:
  • Folosirea iteratiei pentru a auzi diferite instrumente – Video

Updatarea variabilelor in Repeat

Tracing (Descifrati) Repeats

Uneori, ceea ce se intampla in Repeat poate fi confuz. Urmatorul video va ofera un exemplu cum sa   urmariti ce se intampla in Repeat.

Tracing Repeats Video

Intrebare

Ce note ce vor fi cantate cand ruleaza scriptul urmator?
Raspuns: 15 20 25 30 35

Explanation

The script sets “my number” to 10. Then, in the repeat, the script increases “my number” to 15 and says 15. The second time through the repeat, the script increases “my number” to 20 and the cat says 20. The third time through the repeat, the script increases “my number” to 25 and the cat says 25. The fourth time through the repeat, the script increases “my number” to 30 and the cat says 30. The fifth time through the repeat, the script increases “my number” to 35 and the cat says 35. The cat says the numbers 15, 20, 25, 30, and 35.

Tracing Repeats with Multiple Updates

Acest video arata ce se intampla intr-un exemplu cu o variabila care se schimba de mai multe ori in interiorul lui Repeat.

Tracing Repeats with Multiple Updates Video

Intrebare

Ce note ce vor fi cantate cand ruleaza scriptul urmator?
Raspuns: 22 25 28

Explanation

The script first sets “my number” to 10, then increases it to 20. In the repeat, the script increases “my number” to 22, plays note 22, and increases “my number” to 23. The second time through the repeat, the script increases “my number” to 25, plays note 25, and increases “my number” to 26. The third time through the repeat, the script increases “my number” to 28, plays note 28, and increases “my number” to 29. The notes played are 22, 25, and 28.

Tracing Nested Repeats Video

Tracing Nested Repeats Question

Ce note ce vor fi cantate cand ruleaza scriptul urmator?
Raspuns: 12 14 16 21 23 25

Explanation

The script sets the value of “my number” to 10.

The first time through the repeat 2, the script increases “my number” to 12. Then, in the “repeat 3”, the script plays note 12 and increases “my number” to 14. The second time through the repeat, the script plays note 14 and increases “my number” to 16. The third time through the repeat, the script plays note 16 and increases “my number” to 18. At the bottom of the repeat 2, the script increases “my number” to 19.

The second time through the repeat 2, the script increases “my number” to 21. Then, in the “repeat 3”, the script plays note 21 and increases “my number” to 23. The second time through the repeat, the script plays note 233 and increases “my number” to 25. The third time through the repeat, the script plays note 25 and increases “my number” to 27. At the bottom of the repeat 2, the script increases “my number” to 28.

The notes played are 12, 14, 16, 21, 23, and 25.

The Hat Block (blocul Hat/palarie)

Hat Block Introduction Video

Exercitiu: Electric Keyboard (orga), Part 1

In Scratch poti programa ca atunci cand apesi o tasta de pe tastatura sa se intample ceva!

Priveste in tabul Events si vei gasi o piesa aproape de varf, pe care scrie: “when _______ key pressed.”

Dati click pe triunghiul alb pentru a selecta tasta pe care o veti utiliza in program. Noi am ales “a”.

Cand aceasta tasta va fi apasata, Scratch va canta nota 60.

In acelasi mod poti comanda tastele numerice sau sagetile

Incearca acesti pasi, apoi mergi mai departe la full electric keyboard (orga completa)!

Exercise: Electric Keyboard, Part 2

Incearca sa realizezi o orga din tastatura! Codul se mai jos poate fi inceputul:

Indicatie: Poate doresti sa scrii ce nota va canta fiecare tasta, ca sa nu uiti.

Exercise: Electric Keyboard, Part 3

Completeaza codul astfel incat orga sa poata schimba:

  • Volumul – Utilizand aceasta piesa:
  • Instrumentul – Utilizand aceasta piesa:
  • Ritmul – Utilizand aceasta piesa:

Homework 3, Part 1: Tempo

Primele intrebari se refera la cele trei script-uri de mai jos.

Script 1

Script 2

Script 3

Care este tempo-ul (ritmul) dupa ce fiecare script este rulat?

 Script 1: 80

Explanation

The first block sets the tempo to 60. The third block changes the tempo by 20, so the final tempo is 60 + 20 = 80.

Script 2: 80

Explanation

The first block sets the tempo to 60. The repeat changes the tempo by 20 once, so the final tempo is 60 + 20 = 80.

Script 3: 60

Explanation

The first block sets the tempo to 60. The repeat runs 0 times, so the tempo does not change and is still 60 when the script ends.

Dintre aceste scripturi, au vreunele rezultate identice? Daca da, care fac acelasi lucru?

Raspuns: Da. 1 si 2

Explanation

The value of tempo after scripts 1 and 2 run is 80, and both scripts play drum 2 once. However, after script 3 runs, the final value of tempo is 60. Script 3 also does not play drum 2.

Urmatoarele doua intrebari se refera la aceste doua script-uri:

Script A

Script B

Care este tempo-ul dupa ce este rulat Script A?

Raspuns: 10

Explanation

Script A sets tempo to 60, and then sets tempo to 10 three times in the repeat, so the final value of tempo is 10.

Care este tempo-ul dupa ce este rulat Script B?

Raspuns: 90

Explanation

Script B sets the tempo to 60, and then changes the tempo by 10 three times in the repeat, so the final value of tempo is 60 + (3 × 10) = 60 + 30 = 90.

Homework 3, Part 2: Drawing Circles

Ce numere ar trebui introduse in zonele albe ale script-urilor de mai jos, pentru ca fiecare script sa traseze un cerc (sau un poligon care sa semene cu un cerc)? Script-ul ar trebui sa descrie cercul o singura data.

Script A

Raspuns: 1

Explanation

To go around once, the sprite needs to turn a total of 360 degrees. We can figure out how many degrees the sprite needs to turn during each repeat by dividing 360 degrees by the number of repeats. Here, the sprite needs to turn 360 ÷ 360 = 1 degree.

Script B

Raspuns: 10

Explanation

To go around once, the sprite needs to turn a total of 360 degrees. We can figure out how many degrees the sprite needs to turn during each repeat by dividing 360 degrees by the number of repeats. Here, the sprite needs to turn 360 ÷ 36 = 10 degrees.

Script C

Raspuns: 20

Explanation

To go around once, the sprite needs to turn a total of 360 degrees. We can figure out how many degrees the sprite needs to turn during each repeat by dividing 360 degrees by the number of repeats. Here, the sprite needs to turn 360 ÷ 18 = 20 degrees.

Script D

Raspuns: 36

Explanation

To go around once, the sprite needs to turn a total of 360 degrees. We can figure out how many degrees the sprite needs to turn during each repeat by dividing 360 degrees by the number of repeats. Here, the sprite needs to turn 360 ÷ 10 = 36 degrees.

Care dintre acestea realizeaza cercuri de aceeasi marime?

Raspuns: C si D

Explanation

The size of the circle is its perimeter, which we can find by multiplying the number of steps taken by the number of time the sprite moves. Then, the perimeter of the shape drawn by Script A is 1 × 360 = 360, the perimeter of the shape drawn by Script B is 18 × 36 = 648, the perimeter of the shape drawn by Script C is 10 × 18 = 180, and the perimeter of the shape drawn by Script D is 18 × 10 = 180. So, C and D are the same size.

Care deseneaza un cerc mai mare?

Raspuns: B

Explanation

The size will be defined by the total perimeter of the circle drawn, the product of the length of each side (move _ steps) and the number of sides drawn (repeat _). The perimeter for A is 360 steps, for B is 648 steps, and for both C and D is 180 steps.

Homework 3, Part 3: Keeping Track of Variables

Ce valori va lua variabila “points” , cand acest script este rulat? Faceti o lista cu valorile, in ordine, separate de spatiu.
Raspuns: 50 65 80 95 105 120 135 150 160

Explanation

The script first sets the value of “points” to 50. Then, in the inside repeat, it increases the value of “points” by 15 three times, so “points” is set to 65, then 80, and then 95. After that, in the outside repeat, the value of “points” is increased by 10 to 105. Then the script inside the “repeat 2” runs again. The value of “points” is increased by 15 three times, to 120, 135, and 150. Finally, the value of “points” is increased by 10 to 160. So, all of the values “points” takes on are 50, 65, 80, 95, 105, 120, 135, 150, and 160.

Urmatoarele patru intrebari se refera la aceste doua script-uri:

Script A

Script B

Care este primul numar pe care il spune Script A, cand este rulat?

Raspuns: 0

Explanation

Script A sets “my number” to 0, and then says “my number”, so the first number it says is 0.

Care este primul numar pe care il spune Script B, cand este rulat?

Raspuns: 1

Explanation

Script B sets “my number” to 0 and then changes “my number” by 1, so “my number” is 1. Then Script B says “my number”, so the first number that Script B says is 1.

Care este ultimul numar pe care il spune Script A, cand este rulat?

 Raspuns: 9

Explanation

Script A always says “my number” before changing its value. When Script A finishes, the value of “my number” will have increased by 1 ten times, so “my number” will be 10. But Script A will actually say the next-to-last value of “my number”, because it will say “my number” before it is changed the last time. Since “my number” changes by 1 each time, the next-to-last value of “my number” is 10 − 1 = 9.

Care este ultimul numar pe care il spune Script B, cand este rulat?

Raspuns: 10

Explanation

Script B always says “my number” after changing its value. So, the last number Script B says will be the last value of “my number”. When this script finishes running, “my number” will have increased by 1 ten times, so “my number” will be 0 + (10 × 1) = 10. The last number Script B says will be 10.

Iata cateva intrebari care va vor ajuta sa identificati conceptele cu care trebuie sa mai exersati.

Quiz 3

1. Ce valoare va lua X dupa ce dam dublu-click pe script-ul urmator?

2. Listati notele ce vor fi cantate dupa rularea scriptului urmator.

3. Listati numerele pe care le va rosti sprite-ul la rularea scriptului urmator.

4. Listati numerele pe care le va rosti sprite-ul la rularea scriptului urmator.

5. Listati numerele pe care le va rosti sprite-ul la rularea scriptului urmator.

6. Care este lista notelor cantate de scriptul urmator?

7. Cu ce va fi egal dupa ce dam dublu click pe scriptul de mai jos?

8. Cu ce va fi X egal dupa ce dam dublu click pe scriptul de mai jos?

9. Cu ce va fi X egal dupa ce dam dublu click pe scriptul de mai jos?

10. Listati numerele pe care le va rosti sprite-ul la rularea scriptului urmator.

11. Listati numerele pe care le va rosti sprite-ul la rularea scriptului urmator.

12. Cu ce va fi X egal dupa ce dam dublu click pe scriptul de mai jos?

13. Cu ce va fi X egal dupa ce dam dublu click pe scriptul de mai jos?

RASPUNSURI:
1. 8

Explanation

This script first sets X to 10. Then it sets X to 4 + 4 = 8, so X equals 8 after we double click on this script.

2. 60 1 1 1 1

Explanation

The script first sets “my number” to 60. In the repeat, it plays “my number”, which is 60, and then sets “my number” to 1. Then the repeat alternates between playing “my number” and setting it to 1 four more times, so the number 1 is played four times. So, the script plays the notes 60, 1, 1, 1, 1.

3. 1 2 3 4

Explanation

The script first sets the value of “my number” to 1. Then the repeat says the number 1 and changes the value of “my number” to 2. Then the repeat says the number 2 and changes “my number” to 3. This continues twice more, so the script says 3 and 4, and “my number” takes on the values 4 and 5. So, the script says the numbers 1, 2, 3, and 4.

4. 2 3 4 5

Explanation

The script first sets the value of “my number” to 1. Then, inside the repeat, the script increases the value of “my number” by 1, so the value of “my number” is 2. The sprite then says “my number”, which is currently 2. Then the script continues increasing the value of “my number” and then saying “my number” three more times, so the values of “my number” are 3, 4, and 5 and the sprite says 3, 4, and 5. So the numbers that the sprite says when we run this script are 2, 3, 4, and 5.

5. 1 4 7 10

Explanation

The script first sets the value of “my number” to 1. In the repeat, the sprite says 1 and “my number” is increased by 3 to 4. Then, the second time the repeat runs, the sprite says 4 and “my number” is increased to 7. The third time the repeat runs, the sprite says 7 and “my number” is increased to 10. The last time the repeat runs, the sprite says 10 and “my number” is increased to 13. So, the numbers the sprite says are 1, 4, 6, and 10.

6. 60, 60, 60, 60, 60

Explanation

Although there is a variable named “my note” in this script, it’s not played. The script plays the note 60 every time the repeat runs, so the sprite plays 60, 60, 60, 60, and 60.

7. 13

Explanation

The script first sets the value of “my number” to 10. Then the script sets the value of “my number” to “my number” + 3 = 10 + 3 = 13.

8. 14

Explanation

The script first sets the value of “X” to 10. Then the script sets the value of “X” to “X” + 4 = 10 + 4 = 14.

9. 40

Explanation

The script first sets the value of “X” to 10. Then the script sets the value of “X” to “X” × 4 = 10 × 4 = 40.

10. 1 3 5 10 12 14

Explanation

The script first sets the value of “my number” to 1. Inside the “repeat 3”, the sprite says 1 and the value of “my number” is increased to 3. Then, during the second of the three repeats, the sprite says 3 and “my number” is increased to 5. During the third repeat, the sprite says 5 and “my number” is increased to 7. In the “repeat 2”, the value of “my number” is increased to 10. Then the “repeat 3” runs again. First, the sprite says 10, and “my number” is increased to 12. Then, the sprite says 12 and “my number” is increased to 14. Finally, the sprite says 15 and “my number” is increased to 16. In the “repeat 2”, “my number” is increased to 19, and then the script ends. So, the numbers the sprite says are 1, 3, 5, 10, 12, and 14.

11. 6 7 19 20 32 33

Explanation

This script sets “my number” to 1 and then increase “my number” by 2, so “my number” is 3. Then, inside the “repeat 3”, “my number” in increased to 6. Inside the “repeat 2”, the sprite says 6 and “my number” is increased to 7. Then, in the “repeat 2”, the sprite says 7 and “my number” is increased to 8. At the bottom of the “repeat 3”, “my number” is increased to 16.

The second time through the “repeat 3”, “my number” is increased to 19. Then, in the “repeat 2”, the sprite says 19 and “my number” is increased to 20. Then, in the “repeat 2”, the sprite says 20 and “my number” is increased to 21. At the bottom of the “repeat 3”, “my number” is increased to 29.

The third time through the “repeat 3”, “my number is increased to 32. In the “repeat 2”, the sprite says 32 and “my number” is increased to 33. Then, the second time through the “repeat 2”, the sprite says 33 and “my number” is increased to 34. At the bottom of the “repeat 3”, “my number” is increased to 42.

The numbers that the sprite says are 6, 7, 19, 20, 32, and 33.

12. 20

Explanation

The script sets X to 10 and then sets X to 20, so the value of X is 20 after the script runs.

13. 30

Explanation

The script sets X to 10 and then changes X by 20, so the value of X is 10 + 20 = 30 after the script runs.

Capitolul 1. Blocuri de comenzi mobile, realizarea scripturilor , blocuri repetitive

1 1

SCRATCH LINGO (vocabular pentru Scratch)

Pentru a realiza un proiect , trebuie sa invatam ce se poate utiliza acum in Scratch !

Tabs (for blocks):

In editorul Scratch , pe centru-sus, se gaseste o lista cu dreptunghiuri colorate cu diferite denumiri. Acestea sunt block tabs. Le folosim pentru a alege categoriile de blocuri/ comenzi pe care le utilizam in programare.

120

Blocks:

Blocurile sunt piese colorate pe care le putem muta pentru a face programe in Scratch. Blocurile de culori diferite fac lucruri diferite. Blocurile de o anumita culoare le gasim in taburile de aceeasi culoare din block tabs.

1 3

Script:

Un script este o grupare de blocuri conectate (un puzzle), care conduce la o actiune (sunete, miscari, etc..) daca dam dublu-click pe el.

1 4

Tabs (for each Sprite):

Pe centru-sus , deasupra zonei block tabs, se gasesc trei taburi pe care scrie “Scripts”, “Costumes”, si “Sounds”. Acestea sunt taburi pentru fiecare sprite.

1 5

Sprite:

Un sprite este un caracter(figurina) Scrach. Fiecare sprite are propriile script-uri, costume si sunete. Sprite-ul este aratat in sprites area, in stanga-jos pe screen.

1617

Costume:

Fiecare sprite poate avea mai multe costumatii ce pot fi modificate din tabul costume.

18

Stage (scena):

Scena se afla in stanga-sus pe editorul Scratch. Aici putem vedea ce se intampla cand rulam programul (scriptul sub forma de puzzle).

19

COMPUTER SCIENCE LINGO

Iata cateva cuvinte utilizate si in programare, care descriu evenimentele ce pot avea loc in Scratch sau in alte limbaje de programare:

Computer Science Lingo
Lingo Definition
Bug O defectiune (problema) in codul sau rutina unui program. FUN FACT: Primul bug documentat dateaza din 1945: reprezenta o molie gasita in interiorul unui calculator !
User Interface Locul in care are loc interactiunea dintre o si masina. Windows, Scratch, the iPod touch screen si chiar tastatura sunt exemple de user interface.
Code/Program Instructiuni scrise pentru ca un computer sa faca ceva. Cand realizezi un script, tu scrii un cod sau un program. Din cauza asta se cheama computer programming!
Run/Execute Determina sprite-ul sa urmeze instructiunile scriptului. Trebuie sa   “run a script” sau “execute a script” ca sa determini sprite-ul sa faca ce spune scriptul.

Realizarea SCRIPT-urilor

In proiectul tau Scratch, trage cateva blocuri in interiorul “Scripts” area

110

Acum incearca sa conectezi blocurile pentru a creea scriptul urmator:

111

REMOVING A BLOCK (INDEPARTEAZA UN BLOCK)

Cum poti indeparta blocul 112din script, astfel incat sa arate ca mai jos ?

113

RUNNING SCRIPTS

Incearca sa plasezi cateva blocuri de note in scripts area. „Run” scriptul prin dublu-click pe script.

114

EXPERIMENT!

Perfect ! Acum poti creea si schimba script-uri in Scratch. Iti va lua ceva timp pentru a experimeta realizarea diferitelor script-uri.

NAMING YOUR PROJECT (DENUMESTE PROIECTUL)

Poti modifica denumirea proiectului competand casuta de deasupra scenei. In desenul alaturat, numele proiectului este “1. Repeats in a Song”.

115

SAVING YOUR PROJECT (SALVEAZA PROIECTUL)

Este foarte important sa salvezi proiectul cat mai des. Altfel, poti pierde ceva la care ai muncit din greu ! Si asta doare, te asigur.

Pentru a salva un proiect in Scratch, click “Save Now”  in coltul din dreapta-sus, de langa username. Sau, poti da click pe optiunea “Save Now” din meniul “File” din coltul din stanga sus.

116

Repeat

USING REPEAT

Urmariti acest video ca sa invatati cum se foloseste Repeat in Scratch ! Blocul Repeat este foarte util si il vom folosi adesea.

USING REPEAT VIDEO

USING REPEAT QUESTIONS

(1 point possible)

Incercam sa facem un cantecel si incepem cu urmatorul script:

130

Daca vrem sa il rescriem cu ajutorul unui repeat block, ce numar ar trebui sa completam in rubrica alba a blocului repeat ?

131
– incorrect

8

EXPLANATION

In scriptul initial, nota 60 se repeta de 8 ori, deci in interiorul blocului repeat ar trebui sa scriem cifra 8

 

THE REPEAT BLOCK

Pana acum, cand am vrut sa facem ceva din nou si din nou, ne-a luat o multime de timp si am folosit foarte multe blocuri.

De exemplu, pentru a face cantecul de mai jos, folosim 8 piese.

132

Pentru a va face munca mai usoara, utilizati blocul repeat. Click pe “Control” tab din mijlocul ferestrei Scratch.

133

Acest script poate fi restrans cu ajutorul blocului repeat, sub forma urmatoare:

134

EXPERIMENT cu REPEAT

Incercati sa faceti un script care sa utilizeze diferite numere pentru blocul repeat. Iata cateva exemple:

Repeat 3:

135

Repeat 1:

136

Repeat 0:

137

Incercati sa punteti piese inainte, dupa si in interiorul blocului repeat.

138

Incercati sa faceti alte scripturi cu repeat !

Nu stergeti fiecare script pe care il faceti. Lasati-l in scripts area si folositi blocuri noi pentru a face scripturi noi.

Hint (indicatie): Daca dati click-dreapta din mouse, vor apare optiunile “duplicate”, “delete” si “add comment”. Selectati „duplicate”pentru a face o copie a scriptului/blocului ales. Daca nu merge in felul acesta, apasati shift in timpul operatiei.

139

REPEATS WITH 0 AND 1

REPEATS WITH 0 AND 1 VIDEO

REPEATS WITH 0 AND 1 QUESTIONS

(3 points possible)

De cate ori se aude nota 52 cand dam dublu-click pe script ?

140

– incorrect

0

EXPLANATION

Nota 52 se aude de 0 ori.

De cata ori se aude nota 62 daca dam dublu click pe scriptul de mai jos ?

141

– incorrect

1

EXPLANATION

Nota 62 se repeta o singura data.

De cata ori se aude nota 64 daca dam dublu click pe scriptul de mai jos ?

142

– incorrect

1

EXPLANATION

Nota 64 se aude o singura data.

NESTED REPEATS

Putem pute repeat in interiorul unui repeat ! Numim asta nested repeat

NESTED REPEATS VIDEO

NESTED REPEATS QUESTION

(1 point possible)

De cata ori se aude nota 62 daca dam dublu click pe scriptul de mai jos ?

143

– incorrect

6

EXPLANATION

Blocul interior repeta nota de 2 ori, iar blocul exterior repeta totul de 3 ori. Deci, nota 62 se aude de 3 × 2 = 6 ori.

 

COMPLEX NESTED REPEATS

Nested repeats (un repeat impreuna cu un alt repeat) pot fi cu adevarat complicate!!!

COMPLEX NESTED REPEATS VIDEO

COMPLEX NESTED REPEATS QUESTIONS

(2 points possible)

Incercati sa raspundeti la urmatoarele intrebari fara sa utilizati Scratch.

De cata ori se aude nota 55 daca dam dublu click pe scriptul de mai jos ?

144

– incorrect

4

EXPLANATION

Nota 55 se afla in interiorul blocului care repeta de 4 ori , dar in exteriorul celui care repeta de 5 ori, deci se aude de 4 ori.

De cata ori se aude nota 60 daca dam dublu click pe scriptul de mai jos ?

– incorrect

2

EXPLANATION

Nota 60 se gaseste in interiorul blocului care repeta de 2 ori , dar in exteriorul celui care repeta de 5 ori, deci nota se aude de 2 ori.

 

TRICKY NESTED REPEATS

TRICKY NESTED REPEATS VIDEO

TRICKY NESTED REPEATS QUESTIONS

(4 points possible)

Urmatorele intrebari se refera la scriptul de mai jos.

 145

Cand se ruleaza scriptul, care nota se aude prima ?

40  50 60

– incorrect

EXPLANATION

Scriptul reda nota 40 o data, apoi nota 50 de trei ori, apoi nota 69 o data. Apoi se repeta totul . Deci, notele se aud astfel:

40, 50, 50, 50, 60, 40, 50, 50, 50, 60

Prima nota este 40.

Care este ultima nota care se aude?

40 50 60

– incorrect

EXPLANATION

Scriptul reda nota 40 o data, apoi nota 50 de trei ori, apoi nota 69 o data. Apoi se repeta totul . Deci, notele se aud astfel:

40, 50, 50, 50, 60, 40, 50, 50, 50, 60

Ultima nota care se aude este 60.

De cate ori se aude nota 40, dar nota 60 ?

De cata 2 ori.

SET INSTRUMENT

Putem face cantece utilizand diferite instrumente !

SET INSTRUMENT VIDEO

SET INSTRUMENT QUESTION

(1 point possible)

Cand dati dublu-click pe urmatorul block , se aude sunetul vreunui instrument ?

146

Yes No

– incorrect

EXPLANATION

Nu se aude niciun sunet , deoarece acest bloc doar seteaza instrumentul , nu il pune sa cante.

 

TEMA 1

(18/18 points)

Iata cateva intrebari referitoare la urmatorul script:

147

Se poate face acest script mai simplu?

Yes Yes – correct No

EXPLANATION

The play note 62 and play note 64 blocks are repeated one after the other four times in this script. We can make this script simpler by using a repeat block to repeat these notes.

Care dintre urmatoarele blocuri sunt necesare pentru a face o versiune mai scurta a scriptului ?

160 159 152 153 154 155 156 157 158 151 150 149 148

EXPLANATION

We will make the script simpler by adding a repeat block around the play note 62 and play note 64 blocks. We will need one block for each of the notes that are already being played, and a repeat block. So, we will need a play note 60 block, a play note 62 block, a play note 64 block, a play note 65 block, and a repeat block.

Care este cel mai mic numar de blocuri de care avem nevoie ?

5 – correct

5

EXPLANATION

Our new script will need one play note 60 block, one play note 62 block, one play note 64 block, one play note 65 block, and one repeat block. This is a total of 5 blocks.

Noul script va arata asa:

161

Urmatoarele 2 intrebari se refera la urmatorul script:

162

De cate ori se aude nota 61?

1 – correct

1

EXPLANATION

There is one play note 61 block inside the repeat, and the repeat runs the scripts inside of it once. So, the note 61 will play 1 time when the script is run.

De cate ori se aude nota 63 ?

1 – correct

1

EXPLANATION

There is one play note 63 block inside the repeat, and the repeat runs the scripts inside of it once. So, the note 63 will play 1 time when the script is run.

De cate ori se aude toba 13 in scriptul de mai jos ?

163

12 – correct

12

EXPLANATION

The play drum 13 block is repeated four times by the inner repeat block, and the inner repeat block is repeated three times by the outer repeat block. So, the drum 13 is played 3 × 4 = 12 times.

De cate ori se aude nota 62 in scriptul de mai jos ?

164

0 – correct

0

EXPLANATION

The note 62 plays 0 times because a repeat 0 block does not run the script inside of it.

Urmatoarele 2 intrebari se referea la scriptul de mai jos:

165

De cate ori se aude nota 58 ?

2 – correct

2

EXPLANATION

The play note 58 block is inside the repeat 2 block but outside the repeat 3 block. So, the note 52 is played 2 times.

De cate ori se aude nota 48 ?

6 – correct

6

EXPLANATION

The play note 48 block is inside the repeat 3 block and inside the repeat 2 block. So the note 48 will be played 3 × 2 = 6 times.

In ce ordine se aud notele in scriptul de dedesupt. Scrieti notele in ordine, separate de spatiu. Lista incepe astfel:

50 60 70 ________________

166

50 60 70 100 50 60 70 50 60 70 100 – correct

50 60 70 100 50 60 70 50 60 70 100

EXPLANATION

The script will play the notes 50, 60, and 70 twice. Then it will play the note 100. Then the entire pattern will be repeated. The notes played are:

50, 60, 70, 50, 60, 70, 100, 50, 60, 70, 50, 60, 70, 100

Since we started you off with the notes 50, 60, 70, your answer should be:

50, 60, 70, 100, 50, 60, 70, 50, 60, 70, 100

Urmatoarele 6 intrebari se refera la imaginea de mai jos.

167

Cu ce litera este notata zona numita scena?

A  B  C  D  E  F  A

A – correct

Cu ce litera este notata zona in care se gasesc sprite tabs ?

A  B  C  D  E  F  C

C – correct

Cum este notata zona in care se gasesc tabs blocks ?

A  B  C  D  E  F  D

D – correct

Cum este notata scripts area?

A  B  C  D  E  F  F

F – correct

Cum este notat locul in care se afla sprite-ul?

A  B  C  D  E  F  B

B – correct

Cum este notata zona blocks area?

A  B  C  D  E  F  E

E – correct

Ce este un computer “bug”?

Un microcip care arata ca o insecta Un microfon care inregistreaza ce spune userul Un virus care poate infecta sistemul O greseala de programare. O greseala in rularea programului – correct

Ce este un “script”?

O lista de comenzi pe care le poate utiliza programatorul Un set de instructiuni pe care computerul trebuie sa le urmeze. – correct Un program pe computer care nu functioneaza Un program pe computer utilizat la teatru.

QUIZ 1

(10 points possible)

Raspundeti la urmatoarele intrebari:

Considerand urmatorul script:

168

  1. De cate ori se aude nota 62 daca facem dublu-click pe scriptul de mai sus?
  2. De cate ori se aude nota 64 daca facem dublu-click pe scriptul de mai sus?

Acum, consideram scriptul urmator:

169

  1. De cate ori se aude nota 52 daca facem dublu-click pe scriptul de mai sus?
  2. De cate ori se aude nota 62 daca facem dublu-click pe scriptul de mai sus?170
  3. De cate ori se aude nota 60 daca facem dublu-click pe scriptul de mai sus?
  4. De cate ori se aude nota 67 daca facem dublu-click pe scriptul de mai sus?
  5. De cate ori se aude nota 60 daca facem dublu-click pe scriptul de mai sus?172
  6. De cate ori se aude nota 67 daca facem dublu-click pe scriptul de mai sus?
  7. De cate ori se aude nota 60 daca facem dublu-click pe scriptul de mai sus?173
  1. In lista, scrieti in notele in ordinea in care se aud daca dam dublu-click pe scriptul de mai sus.

RASPUNSURI

  1. 5

    Explanation

    The “play note 62” block is inside a “repeat 5” block, so the note is played 5 times.

    2. 1

    Explanation

    There is one “play note 64” block, and it is outside the “repeat” block, so the note 64 is played 1 time.

    3. 1

    Explanation

    There is one “play note 52” block, and it is outside the “repeat” block, so the note 52 is played 1 time.

    4. 6

    Explanation

    There are two “play note 62” blocks inside the “repeat” block. The “repeat” block runs the blocks inside of it 3 times. So, the note 62 is played 3 × 2 = 6 times.

    5. 1

    Explanation

    There is one “play note 60” block. It is inside three nested “repeat 1” blocks, so it will be played 1 × 1 × 1 = 1 time.

    6. 10

    Explanation

    The “play note 67” block is inside a “repeat 10” block and a “repeat 1” block. It will be played 10 × 1 = 10 times.

    7. 1

    Explanation

    The “play note 60” block is inside a “repeat 1” block, so it will be played 1 time.

    8. 5

    Explanation

    The “play note 67” block is inside a “repeat 5” block, so it will be played 5 times.

    9. 50

    Explanation

    The “play note 60” block is inside a “repeat 10” block and a “repeat 5” block. It will be played 10 × 5 = 50 times.

    10. 67 67 62 60 60 60 67 67 62 60 60 60

    Explanation

    The script will play the note 67 twice, because the “play note 67” block is inside a “repeat 2” block. Then it will play the note 62 once. After that, it will play the note 60 three times because the “play note 60” block is inside a “repeat 3” block. Finally, everything will be repeated because all of the blocks from the second “repeat 2” block to the “repeat 3” block are inside another “repeat 2” block. The notes played are:

    67, 67, 62, 60, 60, 60, 67, 67, 62, 60, 60, 60