







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








Logic Error.
Answer: An error in a program that makes it do something other than what the programmer intended. It does not prevent the program from running, but causes it to produce incorrect results. Mathematical mistakes are common causes of logic errors.
debugging.
Answer: Finding and fixing problems in your algorithm or program.
algorithm.
Answer: a set of well-defined logical steps that must be taken to perform a task.
pseudocode.
Answer: Shorthand notation for programming which uses a combination of informal programming structures and verbal descriptions of code.
Flowcharts.
Answer: A graphical representation of the steps in a process; details all of the elements in a process and the sequence in which these elements occur. This a tool that programmers use to design programs
terminal symbols.
Answer: The ovals that appear at the top and bottom of the flowchart. The start terminal marks the starting point, and the End terminal marks the program's ending point.
input symbol.
Answer: indicates an input operation and is represented by a parallelogram in flowcharts
output symbol.
Answer: indicates an output operation and is represented by a parallelogram in flowcharts
Processing Symbols:.
Answer: represent steps in which the program performs some process on data, such as a mathematical calculation. (rectangle in a flow chart)
programmer's customer.
Answer: Any person, group, or organization that is asking you to write a program.
software requirement.
Answer: is simply a single task that the program must perform in order to satisfy the customer
algorithm.
Answer: A set of well-defined logical steps that must be taken to perform a task.
pseudocode.
Answer: a cross between human language and a programming language. Although the computer can't understand it; programmers often find it helpful to plan an algorithm in a language that's almost a programming language but still very readable by humans.
Flowchart.
Answer: a diagram that graphically depicts the steps that take place in a program
Input.
Answer: short notes placed in different parts of a program, explaining how those parts of the program work. They are intended for any person reading a program's code, not the computer.
Answer: In Python you begin a comment with this character. When the interpreter sees it, it ignores everything from that character to the end of the line.
end-line comment.
Answer: a comment that appears at the end of a line of code
A variable.
Answer: is a name that represents a value stored in the computer's memory. Programs use this to access and manipulate data that is stored in memory.
references the value.
Answer: When a variable represents a value in the computer's memory, we say that the variable _________.
assignment statement.
Answer: You use an ______________________ __________________ to create a variable and make it reference a piece of data.
variable = expression.
Answer: assignment statement is written in this general format
assignment operator.
Answer: The = sign is know as the ______________ _______________
quotation marks.
Answer: When you pass a variable as a argument to the print function, you do NOT enclose the variable name in ___________ _____________.
In an assignment statement, the variable that is receiving the assignment must appear on the.
Answer: left side of the = operator
You cannot use a variable until you have.
Answer: assigned a value to it.
Variable Naming Rules.
Answer: 1. You cannot use one of Python's key words. 2. It cannot contain spaces. 3. The first character must be one of the letters a through z, A through Z, or an underscore character ( _ ) 4. After the first character you may use the letters a through z or A through Z, the digits 0 through 9, or underscores. 5. Uppercase and lowercase characters are distinct; they matter.
garbage collection.
Answer: Releases memory that was used for a variable's value once the variable is no longer to be used by a program.
variable reassignment.
Answer: to change the value of a variable based on its current value
data types.
Answer: Python uses _________ to categorize values in memory.
int.
Answer: In Python, when an integer is stored in memory, it is classified as this
float.
Answer: The purpose of testing a program with different combinations of data is to expose run-time and ____ errors.
String constant.
Answer: a specific group of characters enclosed within quotation marks
empty string.
Answer: A string value that has no characters, represented in code as "".
variable.
Answer: A location in memory used for storing data and given a name in a computer program is called a _________ because the data in the location can be changed.
foreground = "red".
Answer: Associate the variable foreground with the value "red".
method invocation.
Answer: the line of code that causes a method to be executed
price%100.
Answer: Assume that price is an integer variable whose value is the price (in US currency) in cents of an item. Assuming the item is paid for with a minimum amount of change and just single dollars, write an expression for the amount of change (in cents) that would have to be paid.
x%10.
Answer: Assume that a variable x has been assigned a integer value,. Write an expression whose value is the last (rightmost) digit of x.
n.
Answer: The character escape sequence to force the cursor to go to the next line is
values.
Answer: Variables are called "variable" because they can reference different values while a program is running - when you assign a value; it will reference that value until you assign it a different value.
whole number.
Answer: A numeric literal that is written as a _____________ ______________ with no decimal point is considered an int
decimal point.
Answer: A numeric literal that is written as a ______________ _____________ is considered a float
input function.
Answer: reads a piece of data that has been entered at the keyboard and returns that piece of data, as a string, back to the program - you normally us this function in an assignment statement
prompt.
Answer: In the general format, _____________ is a string that is displayed on the screen.
exception.
Answer: an unexpected error that occurs while a program is running, causing the program to halt if the error is not properly dealth with.
math operators.
Answer: a programmer's tools for performing calculations
Answer: An expression that contains operands of different data types; also called mixed mode expression
line continuation character.
Answer: Python allows you to break a statement into multiple lines by using this; which is a backslash ( \ ) You simply type the backslash character (no parentheses) where you want to break the statement, then press the Enter key.
parentheses.
Answer: Python also allows you to break any part of a statement that is enclosed in ________________ without using the line continuation character.
newline character.
Answer: You can think of this as a special command that causes the computer to start a new line of output (you do not see it , but when it is displayed, it causes the output to advance to the next line)
end=' '.
Answer: A keyword parameter for the print() function that causes the function to NOT add a newline at the end of the string. (there is a space between the quotes)
end=''.
Answer: A keyword parameter for the print() function that causes the function to NOT add a newline at the end of the string and NOT add a space (there is not space between the quotes.
sep=''.
Answer: When multiple arguments are passed to the print function, they are automatically separated by a space when they are displayed on the screen, if you do NOT want a space printed between the items; you can pass this argument to the print function ie: OneTwoThree
sep='*'.
Answer: You can also tell this special argument to specify a character other than a space to separate multiple items ie: OneTwoThree (you can use any character)**
escape character.
Answer: is a special character that is preceded with a backslash ( \ ), appearing inside a string literal, for example: \n
\n.
Answer: newline escape character in Python
\t.
Answer: This escape character advances the output to the next horizontal tab position (A tab position normally appears after every eighth character)
Answer: Causes a single quotation mark to be printed in Python ie: print('I'm ready to begin') -instead of print("I'm ready to begin") both work in Python
Answer: Causes a double quotation mark to be printed in Python ie: print("Your assignment is to read "Hamlet" by tomorrow.") -instead of print('Your assignment is to read"Hamlet" by tomorrow.') both work in Python
Answer: Causes a backslash character to be printed; in Python ie: print('The path is C:\temp\data.') required when you want to print a backslash; a single one will not work in Python.
string concatenation.
Named Constant.
Answer: is a name that represents a value that cannot be changed during the program's execution.
use d as the type designator.
Answer: How do you use the format function to format integers? They are written in all upper case. Used with magic numbers.
magic number.
Answer: is an unexplained value that appears in the program's code ie: amount = balance * 0.