Activa JavaScript para disfrutar de los vídeos de la Mediateca.
11 variables - Contenido educativo
Ajuste de pantallaEl ajuste de pantalla se aprecia al ver el vídeo en pantalla completa. Elige la presentación que más te guste:
in this example we'll be working with
00:00:00
variables. Variables are containers where useful information
00:00:02
can be saved
00:00:06
to get started we need to create
00:00:08
different variables the first information we want
00:00:10
to find out is the name so
00:00:13
we can call this variable userName
00:00:14
you must make sure you don't use
00:00:17
any spaces the next one to find
00:00:18
out is user's age so we can
00:00:20
call this userAge and finally for
00:00:22
the address we can call it
00:00:25
userAddress
00:00:28
you can set the information for the
00:00:30
variables or you can ask for information
00:00:31
in this example we are going to
00:00:34
ask for the information the first we
00:00:36
need to choose set userName to set
00:00:38
userAge to and set userAddress yo
00:00:41
next go to sensing
00:00:52
and choose ask and wait this needs
00:00:57
to go above the user name
00:01:00
as we want the user to answer
00:01:04
we next choose answer
00:01:07
so set username to answer
00:01:10
repeat these steps for user age and
00:01:14
user address and write in the correct
00:01:19
questions
00:01:22
for example how old are you
00:01:24
and where do you live
00:01:31
after the user has given the information
00:01:38
we want to repeat the information
00:01:41
so next we need the sprite say
00:01:44
for two seconds
00:01:47
we need to repeat it three times
00:01:57
as we have three different pieces of
00:02:00
information
00:02:02
and then we need to add username
00:02:05
user age and user address so say
00:02:08
username say user age and say user
00:02:11
address this allows the user to see
00:02:15
if they have given the right information
00:02:18
at the end you can add stop
00:02:21
all scripts
00:02:24
this can be found in control
00:02:27
here you can see that the sprite
00:02:46
is asking for the information and the
00:02:49
user needs to type it in once
00:02:52
the information has been given the sprite
00:02:55
repeats the information
00:02:58
- Idioma/s:
- Autor/es:
- David Gonzalez Arroyo
- Subido por:
- David G.
- Licencia:
- Reconocimiento - No comercial - Compartir igual
- Visualizaciones:
- 238
- Fecha:
- 22 de febrero de 2021 - 14:50
- Visibilidad:
- Público
- Centro:
- IES MARIE CURIE Loeches
- Duración:
- 03′ 04″
- Relación de aspecto:
- 1.78:1
- Resolución:
- 1280x720 píxeles
- Tamaño:
- 28.10 MBytes