Midterm Test Flashcards
The math.sqrt() function can compute the square root of a negative number.
False
The central processing unit (CPU) is the “eyes” of a computer.
False -it is the brain
The bool data type embodies the mathematical concept of a real number.
False
An algorithm is a step by step set of directions that is independent of the programming language.
True
Information that is stored and manipulated by computers is called pipen.
False
Aliasing occurs when two variables refer to the same object.
True
Since floating point numbers are extremely accurate, they should generally be used instead of integers.
False
A single point on a graphics screen is called a bit.
False
Using eval can make your program insecure as a user could type malicious code and eval will execute it.
True
Python functions can never modify a parameter.
False
In the code
celsius = (fahrenheit * 9/5) + 32
celsius is an example of a(n)
Variable
In Python, the function heading begins with _______ and ends with a ________.
def ….. colon(:)
What is the set of values provided by this expression:
range(15, 3, -3)
{15,12,9,6}
What is the fundamental question of computer science?
What can be computed?
In Python, a “setFill” method that has the argument color_rgb(255,0,0) would set the object’s fill color to what color?
red