up coming computing test Flashcards
Variables
A variable is very useful. When programming, we often need to store information that it can be used and charged as our program is executed
A variable is a storage location. It is created, and given a name at some point during our program
constants
A constant is also a storage location. It contains information that remains the same, throughout the execution of a program.
We could have a constant called ‘Name’, that is assigned the value ‘Sophie’ , but in contrast to a variable, this will not change throughout the program.
Data types
There are many data types that can be stored within a variable or a constant,including:string,integars, real numbers, characters and Boolean data.
All data must be identified as a type, so that the computer can read/understand it.
Some programming languages (such as scratch) identify the data type for you, but with others you must specify it manually.
Interger
An interger is a whole number so not a decimal or fraction
Float
A float is a name for a decimal number
So 100.9 or 22.236787
Boolean
Boolean is data type that can hold only 2 values
so Kid and Adult
String
Text
so name
Character
Its data type that holds Just one character
Weather ?