Prework - Python Prework Final Exam Flashcards
True or False: The following statement creates a dictionary with elements:
d={40:”John”,45:”Peter”}
True
True or False: The following statement creates a dictionary with elements:
d={}
False
True or False: The following statement creates a dictionary with elements:
d={“John”:40,”Peter”:45}
True
True or False: The following statement creates a dictionary with elements:
d={40:”John”,45:”50”}
True
Suppose that list1 = {2,33,22,14,25}, what would the output for list1[0] be?
2
True or False: Boolean is a simple data type.
True
True or False: Floating Point Numbers are a simple data type.
True
True or False: A string is a simple data type.
True
True or False: An integer is a simple data type.
True
True or False: A dictionary is a compound data type.
True
True or False: An object is a compound data type.
False
True or False: A list is a compound data type.
True
True or False: A floating point number is a compound data type.
False
True or False: “While” is a keyword in Python?
True
True or False: “For” is a keyword in Python?
True