WorksheetsPython Quiz
Total questions: 22
Worksheet time: 11mins
What is Python?
A programming language
A data structure
A type of snake
What is a list in Python?
A collection of ordered elements
A string of characters
A mathematical operation
What is a string in Python?
A sequence of characters
A floating-point number
A boolean value
What is a float in Python?
A floating-point number
A collection of ordered elements
A type of snake
What is a boolean in Python?
A boolean value
A programming language
A string of characters
What is a function in Python?
A named block of code
A mathematical operation
A type of snake
What is an operator in Python?
A symbol that performs an operation
A collection of ordered elements
A boolean value
What does the 'def' keyword do in Python?
Defines a function
Defines a variable
Defines a loop
What is a dictionary in Python?
A collection of key-value pairs
A floating-point number
A type of snake
What is an integer in Python?
A whole number
A programming language
A string of characters
What does the 'len' function do in Python?
Returns the length of a sequence
Performs a mathematical operation
Checks if a value is true or false
What does the 'remove' method do in Python?
Removes an element from a list
Adds an element to a list
Sorts a list in ascending order
What does the 'pop' method do in Python?
Removes and returns the last element of a list
Adds an element to a list
Deletes a list
What does the 'add' method do in Python?
Adds two numbers
Adds an element to a list
Adds a key-value pair to a dictionary
What does the 'delete' keyword do in Python?
Deletes a variable
Deletes a file
Deletes a list
What does the 'sort' method do in Python?
Sorts a list in ascending order
Sorts a dictionary by keys
Sorts a string in alphabetical order
What does the 'slice' operator do in Python?
Extracts a portion of a sequence
Performs a mathematical operation
Checks if a value is true or false
What is a matrix in Python?
A two-dimensional array
A floating-point number
A type of snake
What is a lambda function in Python?
An anonymous function
A named block of code
A type of snake
What is pandas in Python?
A data manipulation library
A programming language
A string of characters
What is numpy in Python?
A numerical computing library
A collection of ordered elements
A boolean value
data = "Hello World!"
The expression len(data) evaluates to:
12
11
10
14
