Chapter 2
A ___ is a name that represents a value that does not change during the program's execution Named literal Named constant Variable signature Key term
Named constant
In the expression 12 + 7, the values on the right and the left of the + symbol are called Operands Operators Arguments Math expressions
Operands
An informal language that has no syntax rules and is not meant to be compiled or executed is called Faux code Pseudocode Python A flowchart
Pseudocode
A ___ is a single function that the program must perform in order to satisfy the customer Task Software requirement Prerequisite predicate
Software requirement
A ___ is a sequence of characters Char sequence Character collection String Textblock
String
A ____ is any hypothetical person using a program and providing input for it Designer User Guinea pig Test subject
User
A ____ is a name that references a value in the computer's memory Variable Register RAM slot Byte
Variable
Which built-in function can be used to convert an int value to a float? int_to_float() float() convert() int()
float()
Which built-in function can be used to read input that has been typed on the keyboard? input() get_input() read_input() keyboard()
input()
A(n) ___ is a set of well-defined logical steps that must be taken to perform a task Logarithm Plan of action Logic schedule Algorithm
Algorithm
A magic number is A number that is mathematically undefined An unexplained value that appears in a program's code A number that cannot be defined by 1 A number that causes computer to crash
An unexplained value that appears in a program's code
A(n) ____ makes a variable reference a value in computer's memory Variable declaration Assignment statement Math expression String literal
Assignment statement
Short notes in different parts of a program explaining how those parts of the program work are called Comments Reference manuals Tutorials External documentation
Comments
A string literal in Python must be enclosed in Parentheses Single-quotes Double-quotes Either single-quotes or double-quotes
Either single-quotes or double-quotes
Supposed 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? Int Float Currency Str
Float
A ____ is a diagram that graphically depicts the steps that take place in a program Flowchart Step chart Code graph Program graph
Flowchart
A ____ error does not prevent the program from running, but causes it to produce incorrect results Syntax Hardware Logic fatal
Logic
Which of the following statements will cause an error? x=17 17=x x=99999 x='17'
17=x
This symbol marked the beginning of a comment in Python & * ** #
#
This operator performs division, but instead of returning the quotient it returns the remainder % * ** /
%
This is an operator that raises a number to a power % * ** /
**
This operator performs integer division // % ** /
//