Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 14 Online
OpenStudy (anonymous):

I don't understand some code from LEC 10. numBuckets = 47 #this is ugly. We will see a better way soon def create(): global numBuckets hSet = [] for i in range(numBuckets): hSet.append([]) return hSet def hashElem(e): global numBuckets return e%numBuckets Why, when I do hashElem(1234) does it print 12?

OpenStudy (e.mccormick):

Know what % means in Python (and most programming languages)?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!