I’ve completed the Blossom Hash Map Project but when I ask it to print the meaning of rose, I get None. I watched the video and did exactly what the programmer suggested. I think there is something not right with the assign method.
def assign(self, key, value):
array_index = self.compressor(self.hash(key))
payload = Node([key,value])
list_at_array = self.array[array_index]
for item in list_at_array:
if item == key:
item = value
I don’t see how the Nodes get into the self.array?
You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility
When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!
If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer!