Starting Out with Python Review Questions

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/91

flashcard set

Earn XP

Description and Tags

Flashcards for reviewing key terms and definitions from the Python programming lecture notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

92 Terms

1
New cards

program

A set of instructions that a computer follows to perform a task.

2
New cards

hardware

The physical devices that a computer is made of.

3
New cards

the CPU

The part of a computer that runs programs.

4
New cards

microprocessors

Small chips that CPUs are known as today.

5
New cards

main memory

The computer stores a program and the data that the program is working with in this.

6
New cards

RAM

A volatile type of memory used for temporary storage while a program is running.

7
New cards

secondary storage

A type of memory that can hold data for long periods of time.

8
New cards

an input device

A component that collects data from people or other devices and sends it to the computer.

9
New cards

output

A video display is an example of this device type.

10
New cards

byte

A unit of memory sufficient to store a letter of the alphabet or a small number.

11
New cards

bits

A byte is made up of eight of these.

12
New cards

binary

A numbering system where all numeric values are written as 0s and 1s.

13
New cards

0

A bit that is turned off represents this value.

14
New cards

ASCII

A set of 128 numeric codes representing English letters and characters.

15
New cards

Unicode

An encoding scheme that can represent characters for many languages.

16
New cards

two’s complement

Technique used for encoding negative numbers.

17
New cards

floating point

Technique used for encoding real numbers.

18
New cards

pixels

The tiny dots of color that compose digital images.

19
New cards

a stream of binary numbers

What you would see in a machine language program.

20
New cards

decode

In the fetch-decode-execute cycle, this part involves determining which operation to perform.

21
New cards

machine language

The language that computers can only execute programs written in.

22
New cards

assembler

The tool that translates assembly language to machine language.

23
New cards

keywords

The words that make up a high-level programming language.

24
New cards

syntax

The rules that must be followed when writing a program.

25
New cards

compiler

A program that translates a high-level language program into machine language.

26
New cards

logic error

An error that does not prevent the program from running but causes incorrect results.

27
New cards

software requirement

A single function that the program must perform to satisfy the customer.

28
New cards

algorithm

A set of well-defined logical steps to perform a task.

29
New cards

pseudocode

An informal language with no syntax rules meant for understanding algorithms.

30
New cards

flowchart

A diagram that graphically depicts the steps in a program.

31
New cards

string

A sequence of characters.

32
New cards

variable

A name that references a value in memory.

33
New cards

user

A hypothetical person using the program and providing input.

34
New cards

single-quotes or double-quotes

A string literal in Python must be enclosed in these.

35
New cards

comments

Short notes explaining different parts of a program.

36
New cards

assignment statement

Makes a variable reference a value in memory.

37
New cards

#

This symbol marks the beginning of a comment in Python.

38
New cards

17 = x (you can’t assign to a literal)

Causes an error because you cannot assign a value to a literal.

39
New cards

operands

The values on the right and left of an operator.

40
New cards

//

The operator that performs integer division.

41
New cards

**

The operator that raises a number to a power.

42
New cards

%

The operator that returns the remainder of a division.

43
New cards

float

Data type referenced by price variable after assignment of 99.0.

44
New cards

input()

Built-in function to read input from the keyboard.

45
New cards

float()

Built-in function to convert an int to float.

46
New cards

magic number

An unexplained value appearing in a program’s code.

47
New cards

named constant

A name representing a value that does not change.

48
New cards

decision

A structure that can execute statements under certain circumstances.

49
New cards

single alternative decision

A structure that provides one alternative path of execution.

50
New cards

Boolean

An expression with a value of either True or False.

51
New cards

relational

Operators such as >, <, and ==.

52
New cards

dual alternative decision

A structure testing a condition, taking one path for true and another for false.

53
New cards

if

Statement used to write a single alternative decision structure.

54
New cards

if-else

Statement used to write a dual alternative decision structure.

55
New cards

logical

Operators like and, or, and not.

56
New cards

and

Operator that is true only if both subexpressions are true.

57
New cards

or

Operator that is true if either subexpression is true.

58
New cards

not

Operator that reverses a Boolean expression's logical value.

59
New cards

flag

A Boolean variable signaling when a condition exists.

60
New cards

condition

Type of loop that uses a true/false condition to control repetitions.

61
New cards

count

Type of loop that repeats a specific number of times.

62
New cards

iteration

Each repetition of a loop.

63
New cards

pretest

Type of loop represented by a while loop.

64
New cards

infinite

A loop with no way of ending.

65
New cards

augmented assignment

Type of operator exemplified by the -= operator.

66
New cards

accumulator

A variable keeping a running total.

67
New cards

sentinel

A special value signaling no more items from a list.

68
New cards

garbage in, garbage out

GIGO stands for this.

69
New cards

input

The integrity of program output depends on this.

70
New cards

priming read

The input operation appearing before a validation loop.

71
New cards

error traps

Validation loops are also known by this term.

72
New cards

function

A group of statements that perform a specific task in a program.

73
New cards

code reuse

A design technique that reduces code duplication.

74
New cards

header

The first line of a function definition.

75
New cards

call

To execute a function.

76
New cards

top-down design

Technique for breaking down an algorithm into functions.

77
New cards

hierarchy chart

A diagram showing relationships between functions in a program.

78
New cards

pass

Keyword ignored by Python interpreter, used as a placeholder.

79
New cards

local variable

A variable created inside a function.

80
New cards

scope

Part of a program where a variable may be accessed.

81
New cards

argument

A piece of data sent into a function.

82
New cards

parameter

A special variable receiving data when a function is called.

83
New cards

global variable

A variable visible to every function in a program.

84
New cards

global

Variable type to avoid using when possible.

85
New cards

library function

A prewritten function built into a programming language.

86
New cards

randint

Standard library function returning a random integer in a specified range.

87
New cards

random

Standard library function returning a random float from 0.0 up to 1.0.

88
New cards

uniform

Standard library function returning a random float within a specified range.

89
New cards

return

Statement causing a function to end and send a value back.

90
New cards

IPO chart

Design tool describing input, processing, and output of a function.

91
New cards

Boolean

Type of function returning either True or False.

92
New cards

sqrt

A math module function.