Tell us what’s happening:
i am unable to move forward as a constant error mentioning that there is something wrong with my code pops up however i don’t understand what is wrong with my code .
I have tried refreshing the page multiple times

also test 10 and 15 I’m unable to pass if i could get some help please
Your code so far
class HashTable:
def __init__(self):
self.collection = {}
def hash(self,word):
sum_of_unicode = 0
for letter in word:
sum_of_unicode += ord(letter)
return sum_of_unicode
def add(self,key,value):
hash_key = self.hash(key)
if hash_key in self.collection:
self.collection[hash_key][key]=value
else:
self.collection[hash_key] = {}
def remove(self,key):
hash_key = self.hash(key)
if hash_key in self.collection:
if key in self.collection[key_hash]:
del self.collection[key_hash][key]
return
def lookup(self,key):
hash_key = self.hash(key)
if hash_key in self.collection:
return self.collection[hash_key]
else:
return None
print(HashTable().hash('golf'))
print(HashTable().collection)
print(HashTable().add('golf', 'sport'))
print(HashTable().add('read', 'book'))
print(HashTable().add('dear', 'friend'))
print(HashTable().lookup('golf'))
print(HashTable().collection)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Challenge Information:
Build a Hash Table - Build a Hash Table