Coding(10.3.8 Lesson Review) Flashcards

(10 cards)

1
Q

Which of the following is an example of a character variable?

A

‘7’

Explanation

A character variable stores a single character, like ‘7’.

3.14 is a floating-point number.

“555-1212” is a string.

False is a Boolean value.

Related Content

10.3.2 Variable Types

10.3.4 Characters and Text

10.3.5 Encoding Characters

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

What is a variable in a computer program?

A

A container that holds data for use later

Explanation

A variable acts like a container that holds different types of data such as numbers, words, and phrases for use later in the program.

This is essential for storing data that can change during the execution of a program.

A fixed value that never changes is a constant.

A type of function that performs calculations is not a variable.

A special type of loop in programming is not a variable.

Related Content

10.3.1 What is a Variable in Program Code?

10.3.2 Variable Types

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

Which of the following is an example of an integer?

A

23

Explanation

An integer is a whole number without a fraction or decimal place, like 23.

4.1 is a floating-point number because it has a decimal fraction.

5.62 is also a floating-point number.

9.95 is a floating-point number.

Related Content

10.3.2 Variable Types

10.3.3 Number Types

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

What is a floating-point number?

A

A number that can have decimal fractions

Explanation

A floating-point number can have decimal fractions, like 4.1 or 5.62.

Whole numbers are integers.

A number with a specific number of digits after the decimal point describes fixed-point numbers.

A number used only in financial calculations indicates a fixed-point or floating-point numbers.

However, floating point are not limited to financial calculations.

Related Content

10.3.2 Variable Types

10.3.3 Number Types

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

Which of the following is an example of a string?

A

Hello world

Explanation

Hello world is a collection of characters, making it a string.

7 is an integer.

The $ is a single character.

The @ is also a single character.

Related Content

10.3.2 Variable Types

10.3.4 Characters and Text

10.3.5 Encoding Characters

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

What happens when you enter a number as a character?

A

You cannot perform math operations with it.

Explanation

When a number is entered as a character, you cannot perform math operations with it.

You cannot perform math operations with a number entered as a character.

It remains a character, not a string.

The character does not get deleted.

Related Content

10.3.2 Variable Types

10.3.4 Characters and Text

10.3.5 Encoding Characters

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

In pseudocode, what does the symbol || represent?

A

Logical OR

Explanation

The symbol || represents Logical OR in pseudocode.

&& represents Logical AND.

^ represents Logical XOR.

! represents Logical NOT.

Related Content

10.3.1 What is a Variable in Program Code?

10.3.2 Variable Types

10.3.6 Booleans and Logic

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

Which Boolean operation returns True only if both conditions are True?

A

AND

Explanation

The AND operation returns True only if both conditions are True.

OR returns True if either condition is True.

XOR returns True if one condition is True and the other is False.

NOT inverts the condition, so it returns True if the condition is False.

Related Content

10.3.1 What is a Variable in Program Code?

10.3.2 Variable Types

10.3.6 Booleans and Logic

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

What does it mean for an array to be multidimensional?

A

It can hold arrays within arrays.

Explanation

Multidimensional arrays can hold arrays within arrays.

Multidimensional arrays hold multiple values, not just one.

Multidimensional arrays can be used in more than one dimension.

Arrays are not functions.

Related Content

10.3.2 Variable Types

10.3.7 Arrays

10.4.7 Code Visualizer Lab: For Loop with Array

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

What is an array?

A

A special type of variable that holds many values at once

Explanation

An array is indeed a special type of variable that can hold multiple values at once.

A loop is a control structure that repeats a block of code.

A single value variable holds only one value, not many.

A function is a block of code designed to perform a particular task.

Related Content

10.3.2 Variable Types

10.3.7 Arrays

10.4.7 Code Visualizer Lab: For Loop with Array

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