CH2 Review: Programming Logic & Design - Python

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/19

flashcard set

Earn XP

Description and Tags

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

20 Terms

1
New cards

What does a declaration always provide for a variable? (2.1)

A name, a data type, and a value.

2
New cards

A variable’s data type describes all the following except ___. (2.1)

the scope of the variable

3
New cards

The value stored in an uninitialized variable is ____. (2.1)

garbage

4
New cards

The value 3 is a ___. (2.1)

numeric constant

5
New cards

The assignment operator ___. (2.1)

is a binary operator.

6
New cards

Multiplication has a lower precedence than ___. (2.2)

parentheses

7
New cards

Which of the following is not a term used as a synonym for module? (2.3)

object

8
New cards

Modularization ___. (2.3)

facilitates reusability

9
New cards

What is the name for the process of paying attention to important properties while ignoring nonessential details? (2.3)

abstraction

10
New cards

Every module has all of the following except ___. (2.4)

local variables

11
New cards

Programmers say that one module can ___ another, meaning that the first module causes the second module to execute. (2.3)

call

12
New cards

The more that a module’s statements contribute to the same job, the greater the ___ of the module. (2.4)

function cohesion

13
New cards

In most modern programming languages, a variable or constant that is declared in a module is ____ in that module. (2.4)

global

14
New cards

Which of the following is not a typical housekeeping task? (2.4)

printing summaries

15
New cards

Which module in a typical program will execute the most times? (2.4)

the detail loop

16
New cards

A hierarchy chart tells you ___. (2.4)

which modules call other modules

17
New cards

What are nonexecuting statements that programmers place within code to explain program statements in English?

comments

18
New cards

Program comments are ___. (2.5)

neither required in a program nor a form of external documentation.

19
New cards

Which of the following is valid advice for naming variables? (2.5)

To make names easier to read, separate long names by underscores or capitalization for each new word.

20
New cards

A message that asks a user for inputs is a(n) ___.

prompt