Chapter 2 review Flashcards

1
Q

A blank 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

Design is the most important part of the program development cycle.
How do you understand the task that the program is to perform?

A

-Work with customer to get a sense what the program is supposed to do
-Ask questions about program details
-Create one or more software requirements

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

A(n) blank 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 blank 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 blank 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 blank is a name that references a value in the computers memory

A

variable

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

A blank is any hypothetical person using a program and 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 in

A

either single-quotes or double-quotes

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

Short notes placed 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) blank makes a variable reference a value in the computers 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 comment in Python

A

pound symbol (#)

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

Which of the following statements will cause an error?

a. x = 17
b. 17 = x
c. x = 99999
d. x = ‘17’

A

17 = x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
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
15
Q

This operator performs integer division

A

division operator (//)

-double forward slash is used to perform integer division

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

This is an operator that raises a number to a power

A

exponent operator (**)

17
Q

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

A

remainder operator (%)

18
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

19
Q

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

A

input ()

20
Q

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

A

float ()

21
Q

A magic number is

A

an unexplained value that appears in a programs code

22
Q

A blank is a name that represents a value that does not change during the programs execution

A

names constant

23
Q

True or False

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

A

false

24
Q

True or False

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

A

true

25
Q

True or False

Variable names can have spaces in them

A

false

26
Q

True or False

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

A

true

27
Q

True or False

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

A

false