Users Manual
SCRATCH CODING KIT
We need to use 'list' to create the ability to store passwords for the Tori secret safe. A list is a function that allows
you to save as many values as you want. The list you need is a list of 'input numbers' and a list of 'passwords'. The
Tori secret safe must store the number of button sensors you press in the list for 'input number' in order and then
store the pre-stored password in the list for 'password'.
Drag the blocks as shown in the picture above to create a script. The first block means that you will run the script
when you hit the flag icon on the scratch screen. And the 'Delete all items in code' block, which is linked to the
Mint, means to delete all items in the 'Code' list. It removes all of the previously entered numbers or any remaining
items. The role of the 'Delete all items in the key' block also removes all items in the 'Key' list.
Now try setting the password. The list of passwords is on the 'Key' list. We'll put '1' in the first position, '2' in the
second position, '3' in the third position, and '4' in the fourth position in the list. At this time, we use the 'insert ~
to ~position in Key’ block. We put a specific value in a specific position in the 'Key' list using this block.
For example, the 'Put 1 in Key' block means to save the value of the first item in the 'Key' list as '1'. What you have
coded above is that when you click the flag icon, you delete all the contents of the 'Code' and 'Key' lists and save
the password '1234' in the 'Key' list.
Tori Secret Safe List coding
Tori secret safe basic coding
Activity