Python 1
Python 2
Python 3
Python 4
Python 5
100

What file extension do python files have?

.py

100

Which variable type stores decimal numbers?

float

100

What is a collection of objects inside "[" and "]" called?

List

100

What is an attribute?

a variable declared inside a class

100

How do Python dictionaries retrieve values?

[key]

200

What does the function input() do, and what type of object does it return?

allows the user to type input. returns a string

200

What is the python function to get the length/size of a object?

len()
200

What is a collection of objects inside "(" and ")" called?

Tuple

200

new_obj = MyClass()

new_obj is an _____ of the class MyClass

instance

200

What statement can you use to check if a dictionary contains a certain key?

if key in dict:


300

To use modules in another Python script, you must first ______  the module.

import

300

What are these symbols called?

+,  ==,  - ,  / ,  // ,  *,  **, %

operators

300

What is indexing?

retrieving the element at a certain place in a sequence (list, tuple, string, etc.)

300

What is the difference between a 'function' and a 'method'?

a method is written for an instance of a certain class, a function can be loose outside of a class

300

Why can't you find the "third" or "fourth" element in a dictionary?

Entries are not in order

400

To comment a line in python, which symbol do you use?

#

400

Which type of error would arise here?


a  = 5.888.4

SyntaxError

400

What is it called when you retrieve a contiguous subset of list elements, i.e. mylist[2:6]?

Slice

400

What error would happen here?


a = {'lunch' : 1, 'dinner': 9}

print(a['breakfast'])

KeyError

400

Explain immutability

It describes an object that cannot be changed once created

500

 first Pokémon to be distributed in a Cherish Ball

Tropius

500

What kind of numbers are Ultra Beasts base stats?

Prime numbers

500

IN what game can phanpy learn water gun?

Pokemon Crystal version

500

What color is Jolteon's inner ear in the black and white version of pokemon?

purple

500

What is the only pokemon that can't learn normal type moves?

Weedle