What is the index number of the first element in a Python list?
0
This keyword is used to define a new function in Python.
def
What Python function is used to initialize a connection to a sequential text file?
with open()
In OOP, what do we call the "blueprint" or "template" used to create an object?
A Class.
This debugging technique involves manually following the code's execution path to see how variables change.
Tracing
If my_string = "Robotics", what code would you write to find out how many characters are in that string?
len(my_string)
In the function definition
def calculate(price, tax):
what do we call the variables price and tax?
Parameters
To read the entire contents of a file as a single string, which method should you use on the file object?
.read()
This is the special method name used to define a constructor in a Python class.
__init__
Which team member is responsible for writing the actual code and is usually overseen by a Senior Developer?
Junior Developer.
If you want to combine two strings together, such as first_name and last_name, what is that process called?
Concatenation
What keyword must be used at the end of a function to send a result back to the part of the program that called it?
return
If you open a file using the 'w' (write) mode and the file already contains data, what happens to that existing data?
It is overwritten (deleted).
What is the mandatory first parameter of any method defined inside a Python class?
self
What is the ethical term for protecting a creator’s rights to their original software and preventing others from stealing it?
Copyright (or Intellectual Property).
Which type of loop is specifically designed to iterate through every item in a list without using an index number?
A for-in loop (or Enhanced/For-Each loop).
What is "Functional Decomposition"?
Breaking a large, complex program down into smaller, manageable functions.
Which file mode allows you to add data to the end of a file without deleting what is already there?
'a' (Append mode).
What do we call the variables that belong to a specific object (e.g., car.color or car.speed)?
Attributes (or Data Members / Instance Variables).
What do we call the process of checking a program’s "robustness" by giving it intentionally wrong or extreme inputs?
Testing (or Boundary Testing).
What is the difference between a Static Array and a Dynamic List?
A Static Array has a fixed size that cannot change; a Dynamic List can grow or shrink as needed.
When calling a function, what do we call the actual values passed into the parentheses?
Arguments
Why is it critical to use the .close() method after you are finished with a file?
To save changes, free up system resources, and prevent data corruption.
If you have a class named Robot, write the single line of Python code that creates an object named my_bot from that class.
my_bot = Robot()
Give an example of a "Social Consequence" of computer-controlled automation in the workplace.
Job displacement, need for retraining, or increased efficiency/safety for workers.