DESCRIPTION Students: Please keep in mind the OMSI rules. Save your files often, make sure OMSI fills your entire screen at all times, etc. Remember that clicking CopyQtoA will copy the entire question box to the answer box. In questions involving code which will PARTIALLY be given to you in the question specs, you may need add new lines. There may not be information given as to where the lines should be inserted. If a question includes test code, make sure to include it in your submission Do not answer any question with simulation code unless this is specified. MAKE SURE TO RUN THE CODE IN PROBLEMS INVOLVING CODE! Hit the OMSI Submit and Run button. QUESTION -ext .py -run 'python omsi_answer1.py Write a function that makes an iterator from a dictionary. class diter: dt = diter({'a':5, 'b':12, 'c':13}) for delt in dt: print delt # prints 5,12,13 (maybe different order) QUESTION -ext .py -run 'python omsi_answer2.py In the code below, threads cooperate in finding the sum of numbers in a queue. A thread repeatedly gets a number from the queue, adding it to the queue's private sum. When the queue becomes exhausted, the thread adds its private sum to the global sum. from Queue import Queue import thread class glbls: Q = Queue() numThreads = 2 sum = 0 def dowork(tnum): sum = 0 glbls.sum += sum glbls.top = 10000 for i in range(glbls.top+1): glbls.Q.put(i) thread.start_new_thread(dowork,(1,)) thread.start_new_thread(dowork,(2,)) while glbls.numThreads > 0: pass print glbls.sum