This Python function displays information on the screen.
What is print()?
This data type is used to represent whole numbers such as 7, 42, and -4.
What is an integer?
This is the smallest unit of digital information and can have one of two values.
What is a bit?
This programming structure allows a block of code to be repeated.
What is a loop?
This Python keyword is used to create a function.
What is def?
This symbol is used at the end of an if, for, or while statement before its indented block.
What is a colon (:)?
This data type is used to represent text, such as "Hello" or "CS120".
What is a string?
This is the number of possible combinations that can be represented using four bits.
What is 16?
This is the output:
for i in range(3):
print(i)
What are 0, 1, and 2?
This is the name given to a value that a function receives when it is defined.
What is a parameter?
This is the output of the following code:
x=5
y=3
print(x+y)
What is 8?
This data type can store multiple values in an ordered collection, such as [1, 2, 3].
What is a list?
This type of compression reduces file size by permanently removing some information.
What is lossy compression?
This keyword is executed when the condition of an if statement is false.
What is else?
This statement sends a value from a function back to the code that called it.
What is return?
This operator calculates the remainder after division.
What is the modulus (%)?
This is the value stored in x after these statements execute:
x=-10
x=25
What is 25?
This term refers to splitting one large function into multiple smaller functions that have one and only one task.
What is hierarchical decomposition?
This type of loop occurs when one for loop is placed inside another for loop, allowing the inner loop to execute repeatedly for each iteration of the outer loop.
What is a nested for loop?
This characteristic of a well-designed function means that the function performs one specific task and does not take on unrelated responsibilities.
What is single responsibility?
This is the output of the following code:
x=10
y=4
print(x//y)
print(x%y)
What are 2 and 2?
name[0]="D", name[1]="a", name[2]="v", and name[3]="e"
What is name = "Dave"?
This law states that the number of transistors on a microchip doubles approximately every two years, while the cost of computers is halved.
What is Moore's Law?
This logical operator requires both conditions in an if statement to be True for the entire condition to be True.
What is the and operator?
This is the process of using an existing function in a program by supplying any required arguments and allowing the function to perform its defined task.
What is a function call?