Chapter 2 Flashcards

1
Q

A ______ error does not prevent the program from running, but causes it to produce incorrect results.

A

Logic

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

A ______ is a single function that the program must perform in order to satisfy the customer.

A

Task

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

A _______ is a set of well-defined logical steps that must be taken to perform a task.

A

Algorithm

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

An informal language that has no syntax rules and is not meant to be compiled or executed is called _______.

A

Pseudocode

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

A _____ is a diagram that graphically depicts the steps that take place in a program.

A

Flowchart

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

A ______ is a sequence of characters.

A

String

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

A ______ is a name that references a value in the computer’s memory.

A

Variable

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

A _______ is any hypothetical person using a program providing input for it.

A

User

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

A string literal in Python must be enclosed by _______.

A

Either a single quote or double quote

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

Short notes places in different parts of a program explaining how those parts of the program work are called _________.

A

Comments

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

A(n) _____ makes a variable reference a value in the computer’s memory.

A

Assignment statement

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

This symbol marks the beginning of a common it Python.

A

#

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

In the expression 12+7, the values on the right and left of the symbol are called ________.

A

Operands

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

This operator performs integer division.

A

//

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

This is an operator that raises a number to a power.

A

**

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

This operator performs division, but instead of returning the quotient it returns the remainder.

A

%

17
Q

Suppose the following statement is in a program: price = 99.0. After this statement executes, the price variable will reference a value of which data type?

A

Float

18
Q

Which built-in function can be used to read input that has been typed on the keyboard?

A

input()

19
Q

Which built-in function can be used to convert an int value to a float?

A

int()

20
Q

A magic number is _____________.

A

An unexplained value that appears in a program’s code.

21
Q

A _________ is a name that represents a value that does not change during the programs’s execution.

A

Named constant

22
Q

True or false?

Programmers must be careful to not make syntax errors when writing pseudocode.

A

False

23
Q

In a math expression, multiplication and division take place before addition and subtraction.

A

True

24
Q

Variable names can have spaces in them.

A

False

25
Q

In Python, the first character of a variable cannot be a number.

A

True

26
Q

If you print a variable that has not been assigned a value, the number 0 will be displayed.

A

False