Repository navigation
Documentation
benjamin edited this page Feb 26, 2018
·
2 revisions
Here are some basic pieces of information that will be helpful in this documentation.
- A string is a data type, and is used to represent text rather than numbers.
- It is made up of a set of characters that can also contain spaces and numbers.
- For example, the word
"Cheeseburger", and the phrase"I ate 6 cheeseburgers"are both strings. Even"54321"could be considered as a string, if specified correctly. - Typically, programmers must enclose strings in quotation marks, so the data is recognised as a string rather than a number or a variable.
- An integer is a whole number (Not a fraction, or decimal).
- Therefore, numbers like
1,40,0, and48274are all integers. - Numbers like
4.5and-6.25are not integers, as they cannot have a decimal place, or be fraction.
- As the name implies, these are numbers with a floating decimal point (The decimal place 'floats' between the digits).
- For example,
4.7,0.0001, and-8765.0are all floating point numbers - Numbers without a decimal place are integers
- A boolean is a data type that can have one of two values, true or false.
- For example,
trueis a boolean, but"false"is not, as it has quotation marks, making it a string.