Quizzes Flashcards
T/F: A software developer is the person with the training to design, create, and test computer programs.
True
T/F: All programs are normally stored in ROM and are loaded into RAM as needed for processing.
False
T/F: The CPU understands instructions written in a binary machine language.
True
T/F: The main reason to use secondary storage is to hold data for long periods of time, even when the power supply to the computer is turned off.
True
T/F: RAM is a volatile memory used for temporary storage while a program is running.
True
T/F: The Python language uses a compiler which is a program that both translates and executes the instructions in a high-level language.
False
T/F: IDLE is an alternative method to using a text editor to write, execute, and test a Python program.
True
Programs are commonly referred to as
software
Where does a computer store a program and the data that the program is working with while the program is running?
in main memory
Which computer language uses short words known as mnemonics for writing programs?
Assembly
The process known as the __________ cycle is used by the CPU to execute instructions in a program.
fetch-decode-execute
The __________ coding scheme contains a set of 128 numeric codes that are used to represent characters in the computer’s memory.
ASCII
The disk drive is a secondary storage device that stores data by __________ encoding it onto a spinning circular disk.
magnetically
What is the decimal value of the following binary number?
10011101
157
What is the largest value that can be stored in one byte?
255
T/F: Comments in Python begin with the # character.
True
T/F: When using the camelCase naming convention, the first word of the variable name is written in lowercase and the first characters of all subsequent words are written in uppercase.
True
T/F: According to the behavior of integer division, when an integer is divided by an integer, the result will be a float.
False
T/F: Python formats all floating-point numbers to two decimal places when outputting with the print statement.
False
T/F: A flowchart is a tool used by programmers to design programs.
True
T/F: In Python, math expressions are always evaluated from left to right, no matter what the operators are.
False
T/F: Computer programs typically perform three steps: input is received, some process is performed on the input, and output is produced.
True
What is the informal language, used by programmers use to create models of programs, that has no syntax rules and is not meant to be compiled or executed?
pseudocode
The __________ function 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.
input()
In a print statement, you can set the __________ argument to a space or empty string to stop the output from advancing to a new line.
end
After the execution of the following statement, the variable sold will reference the numeric literal value as (n) __________ data type.
sold = 256.752
float
After the execution of the following statement, the variable price will reference the value __________.
price = int(68.549)
68
What is the output of the following code?
val = 123.456789
print(f’{val:.3f}’)
123.457
Which of the following will display 20%?
- print(f’{20:.0%}’)
- print(f’{0.2:.0%}’)
- print(f’{0.2 * 100:.0%}’)
- print(f’{0.2:%}’)
print(f’{0.2:.0%}’)
What is the output of the following statement, given that value1 = 2.0 and value2 = 12?
print(value1 * value2)
- 24
- value1 * value2
- 24.0
- 2.0 * 12
24.0
T/F: The Python language is not sensitive to block structuring of code.
False
T/F: The if statement causes one or more statements to execute only when a Boolean expression is true.
True
T/F: Python allows you to compare strings, but it is not case sensitive.
False
T/F: Nested decision statements are one way to test more than one condition.
True
T/F: Python uses the same symbols for the assignment operator as for the equality operator.
False
T/F: Expressions that are tested by the if statement are called Boolean expressions.
True
T/F: Decision structures are also known as selection structures.
True
A(n) __________ structure is a logical design that controls the order in which a set of statements execute.
control
Multiple Boolean expressions can be combined by using a logical operator to create __________ expressions.
compound
When using the __________ logical operator, one or both of the subexpressions must be true for the compound expression to be true.
or
A Boolean variable can reference one of two values which are
True or False
What is the result of the following Boolean expression, given that x = 5, y = 3, and z = 8?
x < y or z > x
True
What is the result of the following Boolean expression, given that x = 5, y = 3, and z = 8?
x < y and z > x
False
In Python the __________ symbol is used as the not-equal-to operator.
!=
In Python the __________ symbol is used as the equality operator.
==
T/F: Reducing duplication of code is one of the advantages of using a loop structure.
True
T/F: A good way to repeatedly perform an operation is to write the statements for the task once and then place the statements in a loop that will repeat as many times as necessary.
True
T/F: In Python, an infinite loop usually occurs when the computer accesses an incorrect memory address.
False