programming fundamentals Flashcards
What is a Variable?
Data that can change when told to
What is a constant?
Data that stays the same throughout the code from the start
What is an assignment?
When a value is given to a variable or constant using =
What is the symbol = ?
Equal to
What is the symbol != ?
Not equal to
What is the symbol < ?
Less than
What is the symbol > ?
Greater than
What is the symbol <= ?
Less than or equal to
What is the symbol >= ?
Greater than or equal to
What is MOD?
The number left over when you divide the numbers.
What is DIV?
The integer truncated after dividing the 2 numbers together
What is an integer?
A whole number
What is Read(Float)
A number with a decimal part
What is a character?
a display of information equivalent to one alphabetical letter or symbol
What is a string?
a variable that holds a sequence of one or more alphanumeric characters.
What is Boolean?
True or false
What is casting?
Changing the data type from one to another
Give an example of casting
Changing a variable
Converting into double
To return the length of a string
Len()
To return the string in uppercase
Upper()
To return the string in lowercase
Lower()
To return the 5th character of the string
x = y[5:5]
To return the ASCII value of the character
Ord()
To return the character from the ASCII value
Ord()
What are sub-programs?
Functions and procedures
What is a function?
A self contained module of code
What is a procedure?
A set of coded instructions that tell a computer how to run a program