stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Python Exam 1 Flashcards | StudBud
Explore
/
Python Exam 1
Python Exam 1
77 terms
·
StudBud Administration
·
33 plays
Imported from external platform
Flashcards
77 cards
F
Practice quiz
P
Host live
L
Questions
77
Answers
1
GIGO stands for?
Garbage In Garbage Out
Garbage Input Garbage Output
Garbage Incorrect Garbage Output
Gogobytes Gigibytes
2
The computer stores a program while the program is running, as well as the data that the program is working with, in ___
main memory
the micoprocessor
a secondary
the CPU
3
This is an operator that raises a number to a power
/
**
*
%
4
In a math expression, multiplication and division take place before addition and subtraction.
false
true
5
Main memory is also known as RAM.
True
False
6
and
,
or
, and
not
are operators.
ternary
relational
logical
conditional
7
Single alternative decision structure tests a condition, if true takes a path, or another path if false.
False
True
8
A decision structure can be nested inside another decision structure.
False
True
9
It is not necessary to initialize accumulator variables.
True
False
10
If you print a variable that has not been assigned a value, the number 0 will be displayed
True
False
11
A(n) _____ is a set of well-defined logical steps that must be taken to perform a task.
algorithm
logic schedule
plan of action
logarithm
12
A bit that is turned off represents the following value.
No
-1
0
1
13
This is a boolean variable that signals when some condition exists in the program.
flag
signal
siren
sentinel
14
the following statement subtracts 1 from x: x = x - 1
true
false
15
Each repetition of a loop is known as a(n)
revolution
orbit
cycle
iteration
16
A byte is made up of eight
CPUs
variables
addresses
bits
17
The -= operator is an example of a(n) operator.
complex assignment
augmented assignment
relational
reverse assignment
18
A program can be made of only one type of control structure. You cannot combine structures.
True
False
19
A ___ Is a single function that the program must perform in order to satisfy the customer.
Sofware requirement
Task
Prerequisite
Predicate
20
A(n) makes a variable reference a value in the computer’s memory.
variable declaration
assignment statement
string literal
math expression
21
This type of loop can repeat an undetermined number of times
for
while
22
A ____ -controlled loop uses a true/false condition to control the number of times it repeats.
decision
Boolean
count
condition
23
The words that make up a high level programming language are called
Binary instructions
Mnemonics
Key words
Commands
24
This operator performs division, but instead of returning the quotient it returns the remainder
/
%
**
*
25
In the _____ part of the fetch-decode-execute cycle, the CPU determines which operation it should perform.
fetch
decode
execute
deconstruct
26
A(n) _____ variable keeps a running total.
total
accumulator
sum
sentinal
27
price = 99.0 after this statement executes, the price will be of which data type?
currency
float
int
str
28
A(n) ________ expression has a value of either true or false
binary
decision
Boolean
unconditional
29
A Boolean expression created with the ___ operator is true if either subexpressions are true
OR
AND
NOT
EITHER
30
A ______ structure can execute a set of statements only under certain circumstances
circumstantial
sequence
boolean
decision
31
Negative numbers are encoded using the _____ technique.
ASCII
floating point
two's complement
Unicode
32
A ____ is a name that represents a value that cannot be changed during the program’s execution.
key term
variable signature
named constant
named literal
33
This operator performs integer division:
**
%
/
//
34
A _____ error does not prevent the program from running, but causes it to produce incorrect results.
hardware
fatal
syntax
logical
35
Real numbers are encoded using the _______ technique.
floating point
Unicode
two's complement
ASCII
36
A(n) __________ is a set of instructions that a computer follows to perform a task.
Programming Language
Program
Compiler
Interpreter
37
A sequence of characters that can be typed.
VARIABLE
LOOP
STRING
LIST
38
A compound expression created with the _____ operator is true if both subexpressions are true
BOTH
OR
NOT
AND
39
A syntax error does not prevent a program from being compiled and executed.
False
True
40
The input operation that appears just before a validation loop is known as the
initialization read
prevalidation input
error trap
priming read
41
A __________ is a name that references a value in the computer’s memory
variable
register
byte
RAM slot
42
A(n) ___ structure tests a condition and then takes one path if true, and another if false.
single alternative decision
dual alternative decision
sequence
If-Then statement
43
Variable names can have spaces in them.
False
True
44
Assembly language is considered a high-level language.
False
True
45
An interpreter is a program that both translates and executes the instructions of a program.
False
True
46
Programmers must be careful not to make syntax errors when writing pseudocode programs
True
False
47
The integrity of a program’s output is only as good as the integrity of the program’s .
compiler
input
programming language
debugger
48
While loop is a pretest loop
True
False
49
The tiny dots of color that digital images are composed of are called
bits
bytes
pixels
color packets
50
The symbols > , < , and == are all operators.
ternary
relational
conditional
logical
51
A magic number is .
an unexplained value that appears in aprogram’s code
a number that is mathematically undefined
a number that causes computers to crash
a number that cannot be divided by 1
52
A string literal in Python must be enclosed in
double-quotes
either single-quotes or double-quotes
single-quotes
parentheses
53
A ____ Is any hypothetical person that is using a program and providing input for it.
Designer
User
Guinea pig
Test subject
54
You use a(n) __________ statement to write a single alternative decision structure.
test-jump
if-call
if-else
if
55
The part of a computer that runs programs is called
main memory
the CPU
secondary storage
RAM
56
The structure that provides one alternative path of execution
single execution decision
single alternative decision
one path alternative
sequence
57
Input validation loop works like this when the user enters invalid data, it should ask the user “Are you sure? yes/no".
False
True
58
A set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters is _____.
ASCII
binary numbering
ENIAC
Unicode
59
Validation loops are also known as ____.
defensive loops
error traps
error avoidance loops
doomsday loops
60
The rules that must be followed when writing a program are called ____.
Operators
Key words
Syntax
Punctuation
61
A ______ is enough memory to store a letter of the alphabet or a small number.
bit
switch
transistor
byte
62
A ___ is a diagram that graphically depicts the steps that take place in a program.
flowchart
program graph
step chart
code graph
63
A(n) _____ is a special value that signals when there are no more items from a list of items to be processed.
accumulator
signal
sentinel
flag
64
Which built-in function can be used to get the value that has been typed on the keyboard?
keyboard()
read_input()
get_input()
input()
65
Which of the following statements will cause an error?
x = 17
17 = x
x = '17'
x = 99999
66
To calculate the total number of iterations of a nested loop, add the number of iterations of all the loops.
False
True
67
Images, like the ones created with your digital camera, cannot be stored as binary numbers.
True
False
68
A component that collects data from people or other devices and sends it to the computer is called ___.
a secondary storage device
main memory
an output device
an input device
69
A type of memory that can hold data for long periods of time, even when there is no power
Main memory
CPU storage
RAM
Secondary storage
70
You use a(n) ___ statement to write a dual alternative decision structure.
test-jump
if-call
if
if-else
71
In Python the first character of a variable name cannot be a number.
False
True
72
A condition-controlled loop always repeats a specific number of times.
false
true
73
Short notes placed in different parts of a program explaining how those parts of the program work are called __.
Comments
Reference manuals
Tutorial
External documentation
74
a WHILE loop is...
count controlled
loops forever
condition controlled
never loops
75
In a nested loop, the inner loop goes through all of its iterations for every single iteration of the outer loop.
TRUE
FALSE
76
A ______ -controlled loop repeats a specific number of times.
decision
Boolean
count
condition
77
An informal language that has no syntax rules and is not meant to be compiled or executed is called _______
Python
faux code
flowchart
pseudocode