Introduction to Tables
-
Description
You already know a list can store a sequence of numbers or text. Tables allow us to store multiple lists that are related. For example, suppose we need to store the IDs and names of 5 students. Instead of using 2 lists, it is better to use a table with 2 columns, so that it is clear which ID maps to which name.Each row in a table represents an object: for example, the first row says there is a student with the ID of 1 and a name of Adam.
Adding a Table
To add a table, go to the “Variables” category, and click “Make a table”. You need to give the table a unique name, and also specify whether it is shared by all the sprites or only belongs to the selected sprite.Renaming a Table
If you want to change the settings of the table, you can right-click on its name, then select “Rename table”.
Deleting a Table
To delete a table, you can right-click on its name, then select “Delete the [censored] table”.
Adding Columns
To add a new column to a table, click the grey “+” button. You can input a new column name, such as “Name” or “Age”, and then press the ENTER key to confirm.
Renaming a Column
When you click the dropdown button next to any column, there will be an option for you to rename that column.
Deleting a Column
Similarly, in the dropdown, there is an option for you to delete that column.
Adding and Removing Rows
You can use the “+” button at the bottom left to add a new empty row. To remove a row, select that row first, then click the “x” button on the right.
Adding Data
You can select any cell to add data to it, just like with lists. Note that you can use the TAB key to jump to the following item.
Changing Text Size
You can use the + and - buttons next to the table name to change the size of the text.Learn More
-
info-creaticode