Computers and Technology

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!


Hi I got a Name Error when I made the following entry. It's for my word cloud project in week 6 o
Hi I got a Name Error when I made the following entry. It's for my word cloud project in week 6 o

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
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
image
Computers and Technology, 23.06.2019 11:30, kieante01
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
image
Computers and Technology, 23.06.2019 16:00, ginaaa20
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
image
Computers and Technology, 24.06.2019 18:00, bloop3r
Why is a multiview sketch drawinf different from other sketches like isometric, two point, and oblique
Answers: 1
Do you know the correct answer?
Hi I got a "Name Error" when I made the following entry. It's for my word cloud project in week 6 of...

Questions in other subjects:

Konu
Physics, 07.06.2021 19:30
Konu
English, 07.06.2021 19:30