Basic operations in programming languages Flashcards

1
Q

What is rounding?

A

Reducing the number of digits used to represent a number while maintaining a value that is approximately equivalent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is truncating?

A

The process of cutting off a number after a certain number of characters or decimal places

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is random number generation?

A

A function that produces a completely random number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a pseudorandom number generator?

A

A function that produces a random number that is not 100% number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a relational operator?

A

One that returns a comparison of two values, e.g. whether they are equal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Boolean operator?

A

One that takes in one or two Boolean values and returns a single Boolean value depending on their states

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the AND operator return?

A

True if both inputs are true, false otherwise

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the OR operator return?

A

True if at least one of the inputs are true, false otherwise

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the NOT operator return?

A

True if the input is false, false otherwise

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the XOR operator return?

A

True if precisely one of the inputs is true, false otherwise

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Give five examples of string handling functions

A
  • Length
  • Position
  • Substring
  • Concatenation
  • String to integer conversion
How well did you know this?
1
Not at all
2
3
4
5
Perfectly