Array knowledge
Function knowledge
Array Methods
Overall Python
General Knowledge
100

In Python, an array can be thought of as a collection of these.


What are "elements" or "values"?


100

This keyword is used to define a new function in Python.


What is the "def" keyword?


100

In Python, this method can be used to insert a new element at a specific position in an array.

What is the "insert" method?

100

In Python, this built-in data type is used to represent a sequence of characters.


What is a "string"?


100

This famous Renaissance artist is known for his works "The Last Supper" and "Mona Lisa."


Who is Leonardo da Vinci?




200

When working with arrays in Python, the position of each element is indicated by its unique numeric index, starting at this value.

What is "0"?

200

In Python, this statement is used to end a function definition.


What is the "return" statement?


200

In Python, this method can be used to reverse an array.

What is the "reverse" method

200

This operator is used to concatenate two strings in Python.


What is the plus sign ("+")?


200

This city in the Greater Toronto Area is home to several tech companies, including Rogers Communications, Loblaw Digital, and MDX-i.


What is Brampton?


300

The following code returns a error, Why

list = [1,2,3]

print(list[-1*-1 + 3])

what is the index is too big
300

This punctuation mark is used to separate multiple function parameters in a function definition.


What is a comma (",")?




300

This method can be used to sort the elements in a Python array in ascending order.


What is the "sort" method?

300

This control structure allows code to be executed repeatedly while a given condition is true.


What is a "while loop"?




300

This programming language was created by Guido van Rossum in the late 1980s and is known for its readability and ease of use.


What is Python?


400

This built-in function can be used to access a specific element in a Python array, by passing in its index as an argument.

What is the indexing operator (i.e. [])?

400

the following code returns an error, Why

def square(n):

return n * n

print(square(4))

what is indentation

400

This method can be used to add a new element to the end of a Python array.


What is the "append" method?


400

This control structure is used to execute code for a specific number of times.


What is a "for loop"?




400

This American football team has won the most Super Bowl championships in NFL history, with a total of seven titles.


Who are the New England Patriots?


500

the following python code prints what

list = [1,2,3]

print(list[-3])

what is 1

500

what does this code print

def fact(n):

    if int(n) == 0:

        return(int(1))

    else:

        return(int(n) * fact(int(n)-1))

print(fact(4))

what is 24

500

the following code returns

list = [3,6,1]

list.insert(2,1)

list.reverse()

list.sort()

list.reverse()

list.insert(1,5)

print(list)


what is [6, 5, 3, 1, 1]

500

This built-in function can be used to get the length of a sequence, such as a string or list.


What is the "len" function?




500

this is the 21st element on the periodic table

What is Scandium(Sc)?

M
e
n
u