Chapter 2 Flashcards
A ______ error does not prevent the program from running, but causes it to produce incorrect results.
Logic
A ______ is a single function that the program must perform in order to satisfy the customer.
Task
A _______ is a set of well-defined logical steps that must be taken to perform a task.
Algorithm
An informal language that has no syntax rules and is not meant to be compiled or executed is called _______.
Pseudocode
A _____ is a diagram that graphically depicts the steps that take place in a program.
Flowchart
A ______ is a sequence of characters.
String
A ______ is a name that references a value in the computer’s memory.
Variable
A _______ is any hypothetical person using a program providing input for it.
User
A string literal in Python must be enclosed by _______.
Either a single quote or double quote
Short notes places in different parts of a program explaining how those parts of the program work are called _________.
Comments
A(n) _____ makes a variable reference a value in the computer’s memory.
Assignment statement
This symbol marks the beginning of a common it Python.
#
In the expression 12+7, the values on the right and left of the symbol are called ________.
Operands
This operator performs integer division.
//
This is an operator that raises a number to a power.
**
This operator performs division, but instead of returning the quotient it returns the remainder.
%
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?
Float
Which built-in function can be used to read input that has been typed on the keyboard?
input()
Which built-in function can be used to convert an int value to a float?
int()
A magic number is _____________.
An unexplained value that appears in a program’s code.
A _________ is a name that represents a value that does not change during the programs’s execution.
Named constant
True or false?
Programmers must be careful to not make syntax errors when writing pseudocode.
False
In a math expression, multiplication and division take place before addition and subtraction.
True
Variable names can have spaces in them.
False
In Python, the first character of a variable cannot be a number.
True
If you print a variable that has not been assigned a value, the number 0 will be displayed.
False