WorksheetsPython Vocabulary Quiz 2023
Total questions: 35
Worksheet time: 35mins
What is the purpose of syntax in Python?
To define the scope of code blocks
To store data in named containers
To specify the type of a variable
To dictate how Python code should be structured and written
What is a variable in Python?
A collection of key-value pairs
A reusable block of code
A named container for storing data
An ordered collection of items
Which data type specifies a sequence of characters?
String
Integer
Float
Boolean
What is an integer in Python?
A whole number without a decimal point
A number with a decimal point
A data type that represents either True or False
An ordered collection of items
What is a float in Python?
A whole number without a decimal point
A number with a decimal point
A data type that represents either True or False
An ordered collection of items
What is a boolean in Python?
A whole number without a decimal point
A number with a decimal point
A data type that represents either True or False
An ordered collection of items
What is a list in Python?
A collection of key-value pairs
A reusable block of code
An ordered collection of items
An instance of a class
What is a tuple in Python?
A collection of key-value pairs
An ordered, immutable collection of items
An ordered collection of items
An instance of a class
What is a dictionary (dict) in Python?
A collection of key-value pairs
A reusable block of code
An ordered collection of items
An instance of a class
What is a loop in Python?
A control structure that repeatedly executes a block of code
A named container for storing data
A classification that specifies which type of value a variable can hold
A sequence of characters enclosed in quotes
What is a function in Python?
A control structure that repeatedly executes a block of code
A reusable block of code that performs a specific task
A classification that specifies which type of value a variable can hold
A sequence of characters enclosed in quotes
What is a module in Python?
A control structure that repeatedly executes a block of code
A file containing Python code that can be imported and used in other scripts
A classification that specifies which type of value a variable can hold
A sequence of characters enclosed in quotes
What is a library in Python?
A control structure that repeatedly executes a block of code
A collection of modules that provide pre-written code to perform various tasks
A classification that specifies which type of value a variable can hold
A sequence of characters enclosed in quotes
What is a conditional statement in Python?
A control structure that repeatedly executes a block of code
A control structure that allows you to execute code based on certain conditions
A classification that specifies which type of value a variable can hold
A sequence of characters enclosed in quotes
Which data type specifies a sequence of characters enclosed in quotes?
String
Integer
Float
Boolean
What is an ordered collection of items, which can be of different data types?
List
Tuple
Dictionary
Loop
What is an ordered, immutable collection of items?
List
Tuple
Dictionary
Loop
What is a collection of key-value pairs?
List
Tuple
Dictionary
Loop
Which control structure repeatedly executes a block of code?
Function
Loop
Conditional Statement
Exception
What is a reusable block of code that performs a specific task?
Function
Loop
Conditional Statement
Exception
Which control structure allows you to execute code based on certain conditions?
Function
Loop
Conditional Statement
Exception
What is the whitespace at the beginning of lines in Python that defines the scope of code blocks?
Indentation
Exception
Package
Class
What is an error that occurs during program execution?
Indentation
Exception
Package
Class
What is a class in Python?
A collection of related Python modules organized into directories.
A blueprint for creating objects, which defines attributes and methods.
A file containing Python code, which can be imported and used in other Python scripts.
An instance of a class, which has attributes and can perform methods.
What is an iterable in Python?
A collection of related Python modules organized into directories.
A blueprint for creating objects, which defines attributes and methods.
A file containing Python code, which can be imported and used in other Python scripts.
An object that can be looped over, such as lists, tuples, and dictionaries.
What is indexing in Python?
A collection of related Python modules organized into directories.
A blueprint for creating objects, which defines attributes and methods.
Accessing individual elements in an iterable by their position, starting from 0.
An instance of a class, which has attributes and can perform methods.
What is a slice in Python?
A collection of related Python modules organized into directories.
A blueprint for creating objects, which defines attributes and methods.
A way to extract a portion of an iterable by specifying a range of indices.
An instance of a class, which has attributes and can perform methods.
What is debugging in Python?
A collection of related Python modules organized into directories.
A blueprint for creating objects, which defines attributes and methods.
The process of identifying and fixing errors and issues in your Python code.
An instance of a class, which has attributes and can perform methods.
What is the purpose of a package in Python?
To organize related Python code into directories.
To create blueprints for objects in Python.
To define attributes and methods for objects in Python.
To provide pre-written code for various tasks in Python.
What is the purpose of a class in Python?
To organize related Python code into directories.
To create blueprints for objects in Python.
To define attributes and methods for objects in Python.
To import and use Python code in other scripts.
What is the purpose of an object in Python?
To organize related Python code into directories.
To create blueprints for objects in Python.
To define attributes and methods for objects in Python.
To create instances of a class with attributes and methods.
What is the purpose of an iterable in Python?
To organize related Python code into directories.
To create blueprints for objects in Python.
To define attributes and methods for objects in Python.
To loop over and access elements in Python, such as lists, tuples, and dictionaries.
What is an algorithm?
A set of steps for performing a task, like a recipe.
To add something to the end; for example, adding letters onto the end of a string or adding elements to the end of a list or array.
A value passed to a function.
A rhythm designed for people named "Al."
Comments are
statements only the computer can understand.
programming notes or reminders that the computer ignores.
not appreciated.
statements that allow the computer to test a value and perform different actions depending on the outcome of that test.
Joining two or more strings together to make a larger string is called?
Boolean
Iteration
Concatenation
Decomposition
