What file extension do python files have?
.py
Which variable type stores decimal numbers?
float
What is a collection of objects inside "[" and "]" called?
List
What is an attribute?
a variable declared inside a class
How do Python dictionaries retrieve values?
[key]
What does the function input() do, and what type of object does it return?
allows the user to type input. returns a string
What is the python function to get the length/size of a object?
What is a collection of objects inside "(" and ")" called?
Tuple
new_obj = MyClass()
new_obj is an _____ of the class MyClass
instance
what is 129 in binary
10000001
To use modules in another Python script, you must first ______ the module.
import
What are these symbols called?
+, ==, - , / , // , *, **, %
operators
What is indexing?
retrieving the element at a certain place in a sequence (list, tuple, string, etc.)
what keyword defines a function?
def
what is 87 in binary
01010111
To comment a line in python, which symbol do you use?
#
Which type of data would arise here?
a = 5.888.4
SyntaxError
What is it called when you retrieve a contiguous subset of list elements, i.e. mylist[2:6]?
Slice
var = 7
var >> 1
3
What are the two components of a dictionary data structure?
key and values
var = str(10)
var2 = str(19)
print(var+var2)
what's the result?
What is the name you will set a variable equal to when you want it to have no value?
None
Explain immutability
It describes an object that cannot be changed once created
var = 10
var << 6
640
what do you need at the end of every if statement and loop?
a colon :