1 / 11

Learning Objective

LO: We’re learning to understand when it is appropriate to use particular data types. . Learning Objective. Variables Known as a place holder to store values. Can be shown in a number of data types Constants

stacy
Download Presentation

Learning Objective

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LO: We’re learning to understand when it is appropriate to use particular data types. Learning Objective

  2. Variables Known as a place holder to store values. Can be shown in a number of data types Constants Constants are a little different to normal variables in that they cannot be modified. To add in a variable / constant using touch develop we click on: Variables / Constants….

  3. Data Types…. What would you use them for?

  4. One bit of information Only two outcomes – True or False Used for simple flags to track true or false conditions. Default value is false.

  5. The board is the 2D engine which lets you create the game. You can move objects around on it according to gravity or friction. You can use the board to time elements. Without the board, you will find it difficult to move characters around your screen. Imagine it as your interface. Without setting up the board, you willnot be able to control the appears of yourgame.

  6. We use Numbers because they help us later on in whatever job we will need our code to do. For instants, if we need to calculate numbers. It isn’t good trying to add text together, the program will give you an error. Number variables allow us to use onlynumbers whereas strings allow acombination of numbers and letters.

  7. Sometimes it’s not good enough to just calculate things. We might need to name them. It is not possible to put a persons name inside a number variable. It will give us an error message. Strings allow us to use a combination of numbers and characters providing them they havebeen converted.

  8. This data type is used to specify a date. Within Touch Develop you can call on specific functions such as just the time or the date. You can push buttons such as:

  9. A Sprite is an object or set of objects which performs an action. If you have used scratch before, you will already understand this. Sprites can be programmed to carry out different activities. Most projects have at least one sprite.

  10. Here is some mapping to videos which use some of these data types: Video 1 – Introduces height and width using the board and number data types. Video 2 – Sprite data types introduced. Video 7 – Uses strings in a list. Experiment with the data types and seewhat you can come up with. Useful Videos

More Related