can anyone help
!screenshot removed by moderator as it included part of grader cell codes, posting codes is against community guidelines)
Exercise 1
Your task is to implement the function that generates a dictionary, recording the frequency with which each word in the dataset appears as spam (1) or ham (0).
my output :
{‘like’: {1: 1, 0: 0}, ‘river’: {1: 1, 0: 2}, ‘going’: {1: 1, 0: 0}, ‘love’: {1: 0, 0: 1}, ‘deep’: {1: 0, 0: 1}, ‘hate’: {1: 0, 0: 1}}