Basic operations in programming languages Flashcards
What is rounding?
Reducing the number of digits used to represent a number while maintaining a value that is approximately equivalent
What is truncating?
The process of cutting off a number after a certain number of characters or decimal places
What is random number generation?
A function that produces a completely random number
What is a pseudorandom number generator?
A function that produces a random number that is not 100% number
What is a relational operator?
One that returns a comparison of two values, e.g. whether they are equal
What is a Boolean operator?
One that takes in one or two Boolean values and returns a single Boolean value depending on their states
What does the AND operator return?
True if both inputs are true, false otherwise
What does the OR operator return?
True if at least one of the inputs are true, false otherwise
What does the NOT operator return?
True if the input is false, false otherwise
What does the XOR operator return?
True if precisely one of the inputs is true, false otherwise
Give five examples of string handling functions
- Length
- Position
- Substring
- Concatenation
- String to integer conversion