Computers and Technology, 09.09.2020 14:01, adammartinez12
Hi I got a "Name Error" when I made the following entry. It's for my word cloud project in week 6 of the crash course on python. Anyone familiar with the assignment please share how you overcame this thing thank you!! [Refer to image screenshot of entry pic 23] # LEARNER CODE START HERE frequencies = {} file_contents=file_contents. split() str1='' for word in file_contents: str1= ''.join(ch for ch in word if ch. isalnum()) if str1.lower() not in uninteresting_words: if str1.lower() not in frequencies: frequencies[str1.lower()] = 1 else: frequencies[str1.lower()] += 1 cloud = wordcloud. WordCloud() cloud. generate_from_frequencies() return cloud. to_array() # Display your wordcloud image myimage = calculate_frequencies(file_contents ) plt. imshow(myimage, interpolation = 'nearest') plt. axis('off') plt. show() Error message refer to attached pic 24 - NameError Traceback (most recent call last) in 1 # Display your wordcloud image 2 -> 3 myimage = calculate_frequencies(file_contents ) 4 plt. imshow(myimage, interpolation = 'nearest') 5 plt. axis('off') Thank you!
Answers: 2
Computers and Technology, 22.06.2019 23:30, ansonhunter8891
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
Hi I got a "Name Error" when I made the following entry. It's for my word cloud project in week 6 of...
History, 07.06.2021 19:20
Physics, 07.06.2021 19:30
English, 07.06.2021 19:30
Biology, 07.06.2021 19:30
Chemistry, 07.06.2021 19:30