Hello Yousef,
Your first objective is to show to the users a list of stars (for example, 5), and the number of "filled" stars will tell the user the rating of the movie. So, if you have 3 filled stars in 5 stars (the last two are empty), you will tell the user that the movie has a rating of 3 in 5.
So, one option, the one adopted in the exercise, is to use a ListRecords. The source will be a list of booleans. And in the line template of the ListRecords, you use an IF to show an empty or a filled star. If the value in the current list item is TRUE, you show a filled star. If it is false, you show an empty star.
Now, you must build the list. So, your block receives a rating (the movie rating, for example, 3) and the maximum rating possible (like 5 in our example). What do you want? You want to fill your list with booleans, the first three with TRUE and the rest with FALSE so that your ListRecords in the screen shows the stars correctly.
As you must build the list, each value you want to add to the list must be appended to the end of the list using the ListAppend method.
You do a looping using a counter, that starts in 1 (for example). If the counter is <= than the rating given, you put a TRUE (saying that the star to show at this position should be a filled one). When the counter goes beyond the rating, it starts putting FALSE (meaning an empty star). And the looping stops when the counter is bigger than the max rating.
Ex.
Rating: 3, Max Rating 5.
1. Counter = 1
2. Is Counter <= Max Rating? If so, go to 3, else go to 6
3. Append a new item to the List. The value will be Counter <= Rating. This is a comparison. If Counter is <= than the rating, it will return true, else, it will return false.
4. Increment Counter (Counter = Counter + 1)
5. Go to 2
6. Finish.
Hope this helps.
Cheers.