Learn, Quiz && have fun!

[DATA] Structures

Woohoo!

[{"question_j": "What is RAM?", "correct_j": "a", "box_type_j": "multiple", "code_box_j": "none", "hint_j": "This type of memory needs power to store data. It is temporary.", "answers_j": {"a": "Random Access Memory. With this, you can work on your word document, but if you turn off your computer without 'saving', the work is lost.", "b": "Dodge?", "c": "Readily Avaliable Microprocesses,  Kind of...  Don't pick this one.", "d": "Where permenant data is stored in the Motherboard. --not this one either."}}, {"question_j": "What is a linked list?", "correct_j": "c", "box_type_j": "multiple", "code_box_j": "none", "hint_j": "It's almost literal, data is linked.", "answers_j": {"a": "The grocery list, but you can't get to the next item you need until the first one is in the cart.", "b": "Start -->  middle ---> End", "c": "Pieces of data that are joined by their reference(pointer) to the next or previous piece of data. (Sometimes both.)", "d": "Sounds like something for a tech interview."}}, {"question_j": "A Queue is First in - First out, while a Stack is Last-in - First-out", "correct_j": "True", "box_type_j": "TorF", "code_box_j": "none", "hint_j": "Standing in line at the bank, is a Queue. Going through a pile of books, by grabbing the top one is a stack.", "answers_j": {"T": "True, Sometimes keeping data in these kinds of structures is for the specific order involved in either one.", "F": "False, I can't think of any way to joke about Queue's and Stacks."}}, {"question_j": "What does the x equal at the last line of this code?(Python)", "correct_j": "d", "box_type_j": "multiple", "code_box_j": "class Dog(object):\n    def __init__(self):\n        self.name = 'Fred'\nx=Dog()", "hint_j": "A Python object is like a Tupperware.  It is labled, and holds all it's components inside.", "answers_j": {"a": "x is 5?", "b": "x is not defined.", "c": "x is a cat", "d": "x is a Dog object that has the name Fred."}}, {"question_j": "This is a python dictionary example.  What do you think will print?", "correct_j": "c", "box_type_j": "multiple", "code_box_j": "myDog = {\n\t'dogsName': 'George',\n\t'state': 'Michigan',\n\t'county': 'Montcalm'\n}\nprint(myDog.get('state'))", "hint_j": "The key-value pair system means that if I look for the key: 'state' in myDog, I will get 'Michigan' as a return value. ", "answers_j": {"a": "Python loves dictionaries.", "b": "George loves a good shoe to chew on.", "c": "Michigan", "d": "Dog house."}}, {"question_j": "This is a python tuple (code box below).  You can get the item in the tuple starting at 0. Which cat's name will print?", "correct_j": "d", "box_type_j": "multiple", "code_box_j": "\nMyCats = ('Sage', 'Matcha')\nprint(MyCats[0])", "hint_j": "The [0] -square brackets- are indicating we want the item at position/index 0 in MyCats", "answers_j": {"a": "undefined", "b": "NameError", "c": "Matcha", "d": "Sage"}}, {"question_j": "An array is a data structure that uses keys or indexes, to place in memory a given value. Choose the answers that are true about arrays.", "correct_j": "d", "box_type_j": "multiple", "code_box_j": "none", "hint_j": "Wikipedia is an awesome resource.", "answers_j": {"a": "John von Neumann wrote the first array-sorting program (merge sort) in 1945", "b": "Instead of having pointers like a linked list, the array uses math to determine where an array item is in memory.", "c": "The memory address of the first element of an array is called first address, foundation address, or base address.", "d": "All of the above.  Thanks Wikipedia."}}, {"question_j": "For a tree data structure, there are nodes starting with a root, like the base of a tree, and branching either left or right on each next node like a tree branch.", "correct_j": "True", "box_type_j": "TorF", "code_box_j": "none", "hint_j": "Conceptually a balanced tree would look much like a family tree chart.", "answers_j": {"T": "True, there are many types, binary, ternary, AVL.", "F": "False, why would computer science ever take a hint from natural science?"}}, {"question_j": "Dictionary type data structures have a key and value, and in a lot of languages that value can even be another dicionary.", "correct_j": "True", "box_type_j": "TorF", "code_box_j": "none", "hint_j": "While a json object looks like a python dictionary, the json is stored as a string, while a python dictionary could hold arrays, tuples, even functions.", "answers_j": {"T": "True, json objects(that are stored as strings), can even be loaded into python to become a dictionary.", "F": "False, we're not even gonna talk about hash-tables."}}, {"question_j": "*sorry I lied on the last one* Which of these is true of Hash tables?", "correct_j": "d", "box_type_j": "multiple", "code_box_j": "none", "hint_j": "When determining the air velocity of an unladen swallow, it is important to know if it is an African or European swallow.", "answers_j": {"a": "It can map keys to values. We need to know which swallow can carry the coconut quickest.", "b": "Also called a hash map. Mapping a key to it's corresponding value through the maze of data is important.", "c": "It is widely used because of it's robust uniform efficiency in looking up values for key:value pairs. Unlike a swallow carring a coconut.", "d": "All of the above. Now I'm hungry for hashbrowns... Thanks for learning with us!"}}]

Question number:

1

What is RAM?


            

This type of memory needs power to store data. It is temporary.