Prijavi problem


Obeleži sve kategorije koje odgovaraju problemu

Još detalja - opišite nam problem


Uspešno ste prijavili problem!
Status problema i sve dodatne informacije možete pratiti klikom na link.
Nažalost nismo trenutno u mogućnosti da obradimo vaš zahtev.
Molimo vas da pokušate kasnije.

Block-based Programming in Scratch

Lists

    Q-3: We have created the variable VAnswer. At one point, the value of this variable is AnswerMima, and at another point, its value is AnswerMi. Choose the correct statement:

  • Variable stores multiple pieces of information (numbers, strings, values True or False)
  • Think about your answer. If you still think the same, create these programs in Scratch and run them. Don't forget to arrange so that the values of the variables can be seen on the stage.
  • Variable stores only one piece of information (a number, a string, value True or False)
  • Well done! Even though they are different, the running of both programs has the same result.

In the process of creating a program, programmers often have to store a lot of data (telephone numbers, names of products, addresses, etc.). In these situations, the variables we have been using so far are not very helpful.

Because of these situations, which you will surely encounter in your future programming, we present you the List.

A list is a collection of data. You can look at it as a “notebook” containing a large number of “pages”. Each “page” has a number (from 1 onward) and one piece of information is written (stored) in each of the “boxes”.

A list is created in the category Variables, by clicking on the button MakeList. A list can refer to one or all of the sprites in a program. List elements are entered by clicking on the sign + and writing values in the corresponding fields.

_images/NewList.png

Unlike regular variables, which are retrieved by indicating their name, each item from a list can be retrieved “called upon” by indicating their number (position) on the list.

The list Emotikoni contains 5 items - text symbols depicting facial expressions. If we want the cat to say how WINKING can be depicted by using symbols, we need to make the following list:

_images/KodEmo.png

We made the same quiz by using regular variables and by using lists. Analyze their scripts:

_images/2Kviza.png

Uradi Remix programs A and B, which can be found at A: https://scratch.mit.edu/projects/326482978/ and B: https://scratch.mit.edu/projects/326477714/, by adding at least three questions related to feelings and emoticons that represent them. We have no doubt you will notice how much time we save by using lists instead of variables.