Los bloques de instrucciones de sonido y lápiz nos van a permitir añadir audio a nuestros programas y a crear trazos con los movimientos de los objetos.
Los bloques de control y sensores nos van a permitir añadir condiciones y repeticiones bajo determinados circunstancias en nuestros juegos y animaciones
Mediante la utilización de variables para almacenar valores y operadores para realizar cálculos, Scratch nos da más potencia para realizar juegos más complejos
Define your own blocks in Scratch. Create a block that says a random greeting (no argument required), then create a block that draws a polygon with a certain number of sides (argument required).
If you’d prefer to watch a video, the following video demonstrates the same ideas I’ve described in text below.
11.1. Say Greeting Block
At this point in our exploration of Scratch, we have learned how to use a large number of different blocks. What do we do, however, when we would like to have some functionality that isn’t built into Scratch? As it turns out, we can create our own blocks, and use them just like the built in blocks! This is an incredibly powerful idea in Computer Science, and in most languages is called creating your own functions (we will explore how to do this in another language soon!).
Perhaps we would like to have a block that would say a greeting, choosing one at random from a number of different languages. For this example, we will have our block choose from one of the following greetings:
Number
Language
Greeting
1
English
Hello
2
French
Bonjour
3
Cree
Tanisi
4
Chinese
nǐ hǎo
5
Arabic
as-salām ‘alaykum
6
German
Guten Tag
7
Punjabi
sat srī akāl
8
Spanish
¡Hola!
There are 8 different greetings listed above. In order to choose between them, we need to have Scratch choose a random number from 1 to 8, then say one of the above greetings based on which number was chosen. If we wanted our sprite to say a random greeting when we press the flag, we could create the following:
What if we wanted to make our sprite say a random greeting in multiple situations? Perhaps we still want the sprite to say a greeting when the flag is clicked, but we also want it to say a greeting when it is clicked, when the space key is pressed, or when the noise level in the room with our computer gets particularly loud. Up until now, we would have to duplicate the code that we have just made, and attach it to multiple events. A better way is to create a new block, perhaps called “say hello in random language”. To do this, select the More Blocks tab, then click Make a Block. In the empty block that now appears, type in the name you would like your new block to have:
You will now see a new event style block appear in your scripts area, called “define say hello in random language”. You should drag the code that was previously attached to the “when flag clicked” block, and attach it to this new definition block.
Once this new block has been defined, we can call it like any other built-in block. To do this, simply drag the block in from the More Blocks tab. We can now have our sprite say hello in a random language when many different events occur, without having to duplicate our code over and over.
11.2. Draw Polygon Block
If you inspect the built-in blocks available to us in Scratch, you will notice that there are two different types of blocks.
For some blocks, such as the “if on edge, bounce” block, we do not provide any additional information to the block. With the “move 10 steps” block, however, we can control the behaviour of the block by changing the value of the argument to the block (originally set at 10). The greeting block we made above did not take in any arguments. Let’s try creating a block that does take in arguments.
When we began to explore scratch_variables, we found a nice pattern to help us draw regular polygons. We want to use that pattern again, this time to create a block similar to the following:
In order to create a block that takes arguments, first select “Make a Block” from the More Blocks tab. Type in drawa, then click Options, and select “Add number input”. Label the number input numberofsides, then add label text sidedpolygon,witheachside. Add another number input called sidelength, then finally label text stepslong.
Now that you have a block definition in your scripts area, recall the pattern that we used to draw regular polygon. If we only wanted to draw a square, our code would look like this:
We obviously do not want to have the block always draw a square. To allow the arguments that we pass to the block to be used, we simply drag them from the block definition into the code. For this code, drag the numberofsides number input onto both the repeat block, as well as the turn block. Then drag the sidelength number input onto the move block.
Now that we have set up our drawing polygon block, you can use it like any other scratch block. For example, if you wanted to have a pentagon drawn when the user presses the space key, you would simply choose a 5 sided polygon, and pick a side length for the drawing.
11.3. Practice Problem
Work on your current Scratch assignment, for any remaining time.
Note
If your teacher did not assign you a project, you should explore the Scratch website to discover what types of projects are possible. Now try to create the most impressive project you can, making sure you demonstrate your understanding of the main topics shown so far (broadcasts, repetition, if/else, and variables).
Tabs, letra y acordes de 'Felices los 4' por Maluma
Video tutorial de Felices los 4
[Intro]
Dm - C - Gm - C
[Verso 1]
Dm C
Apenas sale el sol y tú te vas corriendo
Gm C
Sé que pensarás que esto me está doliendo
Gm C
Yo no estoy pensando en lo que estás haciendo
F Dm
Si somos algo y así nos queremos
[Estribillo 1]
Gm
Si conmigo te quedas
C
O con otro tú te vas
F
No me importa un carajo
Dm
Porque sé que volverás
Gm
Si conmigo te quedas
C
O con otro tú te vas
F
No me importa un carajo
Dm
Porque sé que volverás
[Estribillo 2]
Gm
Y si con otro pasas el rato
C
Vamo' a ser feliz, vamo' a ser feliz
F
Felices los 4
Dm
Te agrandamos el cuarto
Gm
Y si con otro pasas el rato
C
Vamo' a ser feliz, vamo' a ser feliz
F
Felices los 4
Dm
Yo te acepto el trato
[Coro]
Gm
Y lo hacemos otro rato
C
Y lo hacemos otro rato
F
Y lo hacemos otro rato
Dm
Y lo hacemos otro rato
[Verso 2]
Gm
Y lo hacemos otro rato
Lo nuestro no depende de un pacto
C
Disfruta y solo siente el impacto
F
El boom boom que te quema, ese cuerpo de sirena
Dm
Tranquila que no creo en contratos
(Y tu menos...)
Gm C
Y siempre que se va, regresa a mí
Y felices los 4
F Dm
No importa el que dirán, nos gusta así
Gm C
Y siempre que se va, regresa a mí
Y felices los 4
C F
No importa el que dirán, somos tal para cual
[Estribillo 2]
Gm
Y si con otro pasas el rato
C
Vamo' a ser feliz, vamo' a ser feliz
F
Felices los 4
Dm
Te agrandamos el cuarto
Gm
Y si con otro pasas el rato
C
Vamo' a ser feliz, vamo' a ser feliz
F
Felices los 4
Dm
Yo te acepto el trato
[Coro]
Gm
Y lo hacemos otro rato
C
Y lo hacemos otro rato
F
Y lo hacemos otro rato
Dm
Y lo hacemos otro rato
[Estribillo 1]
Gm
Si conmigo te quedas
C
O con otro tú te vas
F
No me importa un carajo
Dm
Porque sé que volverás
Gm
Si conmigo te quedas
C
O con otro tú te vas
F
No me importa un carajo
Dm
Porque sé que volverás
[Estribillo 2]
Gm
Y si con otro pasas el rato
C
Vamo' a ser feliz, vamo' a ser feliz
F
Felices los 4
Dm
Te agrandamos el cuarto
Gm
Y si con otro pasas el rato
C
Vamo' a ser feliz, vamo' a ser feliz
F
Felices los 4
Dm
Yo te acepto el trato
[Coro]
Gm
Y lo hacemos otro rato
C
Y lo hacemos otro rato
F
Y lo hacemos otro rato
Dm
Y lo hacemos otro rato
[Outro]
Gm C
Y siempre que se va, regresa a mi
(Maluma baby)
F Dm
No importa el que dirán, nos gusta así
(Kevin ADG, Chan El Genio)
Gm C
Y siempre que se va, regresa a mi
(El código secreto, baby)
F Dm
No importa el que dirán, somos tal para cual
Así lo quiso el destino mami
Mua
Intro: BmEmABm (x2)
BmEm
Tu eres mi hermano del alma,y realmente el amigo,
AD
que en todo camino y jornada esta siempre conmigo.
GEm
Aunque eres un hombre aun tienes alma de niño,
F#mBmABm
aquel que me das, su amistad, su respeto y carino...
BmEm
Recuerdo que juntos pasamos muy duros momentos,
AD
y tu no cambiaste por fuertes que fueran los vientos...
GEmF#m
Es tu corazon una casa de puerta abiertas, tu-eres realmente
Bm
El mas cierto en horas inciertas. . .
Solo: BmEmABmBmEm
En ciertos momentos dificiles que hay en la vida,
AD
buscamos a quien nos ayude a encontrar la salida
GEm
Y aquella palabra de fuerza y de fe que me has dado,
F#mBm
Me da la certeza, que siempre tuvieste a mi lado
BmEm
Tu eres mi amigo del alma en toda jornada,
AD
sonrisa y abrazo festivo a cada llegada
GEm
Me dices verdades tan grandes con frases abiertas
EmF#mBm
tu eres realmente el mas cierto en horas inciertas...
Solo: BmEmABmBmEmA
No preciso ni decir, todo eso que te digo, pero es bueno asi sentir
Bm
que eres tu mi gran amigo. (BIS)
Versión 2 - Amigo (Acordes para piano o teclado (con notas))
este podria utilisarse en flautas
mandolinas y (Re5tos)
si la mi si la mi si la
do si mi do si mi do si
do si mi do si mi do si
si si la sol la
(esta parte se repite barias veses lo pueden seguir
escuchando la cancion)
mi-do-si-la-do-si-la-do-si-la-do-si-la-do-fa
fa-si-la-sol-si-la-sol-si-la-sol-si-la-sol-si-mi
mi-la-sol-fa-la-sol-fa-la-sol-fa-la-sol-fa-mi-re
fa-mi-re-fa-mi-re-fa-mi-re-fa-mi-re-re-do
(esta es la parte final y se repite 2 veses)
la-si-do-do-si-si-la-
si-do-re-re-do-do-si-si-
la-si-do-do-si-si-la-
la-si-do-do-si-la-sol-sol
si tienes dudas solo escribeme o.k.
Versión 3 - Amigo (Letra y acordes)
LAm
Tù eres mi hermano del alma
REm
realmente el amigo
SOL7
que en todo camino
y jornada
DO
estàs siempre conmigo.
FA
Aunque eres un hombre
REm
aùn tienes alma de niño,
MI7
aquel que te da su amistad
LAm
su respeto y cariño.
Recuerdo que juntos pasamos
REm
muy duros momentos,
SOL7
y tù no cambiastes por fuertes
DO
que fueran los vientos
FA
es tù corazòn una casa
REm
de puertas abiertas
MI7
tù eres realmente el màs cierto
LAm
en horas inciertas.
En ciertos momentos difìciles
REm
que hay en la vida
SOL7
buscamos a quièn nos ayude
DO
a encontrar la salida
FA
y aquella palabra de fuerza
REm
y de fe que me has dado
MI7
me dà la certeza que siempre
LAm
estuviste a mi lado
Tù eres mi amigo del alma
REm
en toda jornada
SOL7DO
sonrisa y abrazo festivo a cada llegada
FA
me dices verdades tan grandes
REm
con frases abiertas
MI7
tù eres realmente el màs cierto
LAm
en horas inciertas.
No preciso ni decir
REm
todo eso que te digo
SOL7
pero es bueno asì sentir
LAm
que eres tù mi gran amigo. (BIS)
Versión 4 - Amigo (Tablatura para guitarra (TAB))
esta es mi primera transcripcion espero que les guste
E .----0----7--5----0---7--5-----0---7—5---:---0-----8--7-------8--7-------8--7--
B .----------------------------------------:----------------6----------6---------
G .----------------------------------------:-------------------------------------
D .----------------------------------------:-------------------------------------
A .----------------------------------------:-------------------------------------
E .----------------------------------------:-------------------------------------
E .----0---8-7------8-7------8-7----:--7-7-5-------5--
B .--------------6--------6---------:----------8------
G .---------------------------------:-----------------
D .---------------------------------:-----------------
A .---------------------------------:-----------------
E .---------------------------------:-----------------
E .----5---7---8-8-----7-7----5---:--5---7--8---8/10--10--8--7--10--7--
B .-------------------------------:------------------------------------
G .-------------------------------:------------------------------------
D .-------------------------------:------------------------------------
A .-------------------------------:------------------------------------
E .-------------------------------:------------------------------------
E .----7--8---10--10----8--8---7--:--7--5--7--5--5------5--
B .-------------------------------:------------------8-----
G .-------------------------------:------------------------
D .-------------------------------:------------------------
A .-------------------------------:------------------------
E .-------------------------------:------------------------
solo hay que escuchar la cancion para saber
en que parte se toca el requinto...
Versión 5 - Amigo (Letra y acordes)
SIm
TU ERES MI HERMANO DEL ALMA
MIm
REALMENTE EL AMIGO
LA7
QUE EN TODO CAMINO Y JORNADA
RE
ESTAS SIEMPRE CONMIGO.
SOL
AUNQUE ERES UN HOMBRE
MIm
AUN TIENES ALMA DE NÑO
FA#7
AQUEL QUE ME DA SU AMISTAD
SIm
SU RESPETO Y CARIÑO.
RECUERDO QUE JUNTOS PASAMOS
MIm
MUY DUROS MOMENTOS
LA7
Y TU NO CAMBIASTE
REm
POR FUERTE QUE FUERAN LOS VIENTOS.
SOL
ES TU CORAZÓN UNA CASA
MIm
DE PUERTAS ABIERTAS
FA#7
TU ERES REALMENTE EL MAS CIERTO
SIm
EN HORAS INCIERTAS.
NO ES PRECISO NI DECIR
MIm
TODO ESTO QUE TE DIGO
FA#7
PERO ES BUENO ASI SENTIR
SIm
QUE ERES TU MI GRAN AMIGO.
SIm
EN CIERTOS MOMENTOS DIFICILES
MIm
QUE HAY EN LA VIDA
LA7
BUSCAMOS A QUIEN NOS AYUDE A
RE
ENCONTRAR LA SALIDA.
SOL
Y AQUELLA PALABRA DE FUERZAY DE FE
MIm
QUE ME HAS DADO
FA#7
ME DA LA CERTEZA QUE SIEMPRE
SIm
ESTUVISTE A MI LADO.
TU ERES MI AMIGO DEL ALMA
MIm
EN TODAS JORNADAS
LA7
SONRISA Y ABRAZO FESTIVO
RE
A CADA LLEGADA.
SOL
ME DICES VERDADES TAN GRANDES
MIm
CON FRASES ABIERTAS
FA#7
TU ERES REALMENTE EL MAS CIERTO
SIm
EN HORAS INCIERTAS.
NO ES PRECISO NI DECIR
MIm
TODO ESTO QUE TE DIGO
FA#7
PERO ES BUENO ASI SENTIR
SIm
QUE YO TENGO UN GRAN AMIGO.
RITMO: BALADA RITMICA
SALUDOS A LA PREPA 2
Y A LOS AMIGOS DE LA COL. LOMA LINDA.
Y A LA EXSECUNDARIA DONDE ANDUVE VARIOS AÑOS
SEC# 47 'CUAUHTEMOC'
EL QUE QUIERA EL REQ. DE ESTA ROLA POR FAVOR
CONTACTENME Y YA VEREMOS YO TENGO EL ORIGINAL.
Versión 6 - Amigo (Acordes para piano o teclado (con notas))
Cm
sol Re Do sol Re Do sol Re Do
Fm
sol Mi Re la Mi Re la Mi Re
B7 Cm
la Mi Re la Mi Re la Mi Re Re Re Do si Do
Cm
TU ERES MI HERMANO DEL ALMA
sol Mi Re Do Mi Re Do Mi Re
Fm
REALMENTE EL AMIGO
Do Mi Re Do Mi la
Bb
QUE EN TODO CAMINO Y JORNADA
fa Re Do si Re Do si Re Do
Eb
ESTAS SIEMPRE CONMIGO
si Re Do si RE sol
Ab
AUNQUE ERES UN HOMBRE
mi Do si la Do si
Fm
AUN TIENES ALMA DE NIÑO
la Do si la Do si la sol fa
G7
AQUEL QUE ME DA SU AMISTAD
sol la sol fa la sol fa la
Cm
SU RESPETO Y CARÑO
sol fa la sol fa fa mi
Recuerdo que juntos pasamos
muy duros momentos
y tu no cambiaste por fuertes
que fueran los vientos
Es tu corazón una casa
de puertas abiertas
tu eres realmente el más cierto
de horas inciertas
En cierto momentos difíciles
que hay en la vida
buscamos a quien no ayude
a encontrar la salida
Y aquella palabra de fuerza
y de fe que me has dado
me dan la certeza que siempre
estuviste a mi lado
Tu eres mi amigo del alma
en toda jornada
sonrisa y abrazo festivo
a cada llegada
Me dices verdades tan grandes
con frases abiertas
tú eres realmente el más cierto
en horas inciertas
Cm
NO PRECISO NI DECIR
Do Re Mi Mi Re Do Do
Fm
TODO ESTO QUE TE DIGO
Do Mi Fa Fa Mi Re Re Do
Fm6
PERO ES BUENO ASI DECIR
Re Mi Fa Fa Mi Re Mi
Cm
QUE ERES TU MI GRAN AMIGO
Re Do Re Re Do si Do Do