Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Crash Course on Python Programming Assignment Solution

This course is designed to teach you the foundations in order to write simple programs in Python using the most common structures. No previous exposure to programming is needed. By the end of this course, you’ll understand the benefits of programming in IT roles; be able to write simple programs using Python; figure out how the building blocks of programming fit together; and combine all of this knowledge to solve a complex programming problem.

Enroll on Coursera

Programming Assignment: Programming: Final Project: WordCloud Solution

Project goal 

Create a dictionary with words and word frequencies that can be passed to the generate_from_frequencies function of the WordCloud class.

Once you have the dictionary, use this code to generate the word cloud image:

cloud = wordcloud.WordCloud()
cloud.generate_from_frequencies(frequencies)
cloud.to_file("myfile.jpg")
Things to remember 
  • Before processing any text, you need to remove all the punctuation marks. To do this, you can go through each line of text, character-by-character, using the isalpha() method. This will check whether or not the character is a letter.
  • To split a line of text into words, you can use the split() method.
  • Before storing words in the frequency dictionary, check if they’re part of the “uninteresting” set of words (for example: “a”, “the”, “to”, “if”). Make this set a parameter to your function so that you can change it if necessary.
Input file

For the input file, you need to provide a file that contains text only. For the text itself, you can copy and paste the contents of a website you like. Or you can use a site like Project Gutenberg to find books that are available online. You could see what word clouds you can get from famous books, like a Shakespeare play or a novel by Jane Austen.

Jupyter Notebooks Help

Remember that if you need help with Jupyter Notebooks, you can check out this help page.

Conclusion:

I hope this Crash Course on Python Programming Assignment Solution would be useful for you to learn something new from this Course. If it helped you then don’t forget to bookmark our site for more peer graded solutions.

This course is intended for audiences of all experiences who are interested in learning about new skills in a business context; there are no prerequisite courses.

Keep Learning!

More Peer-graded Assignment Solutions >>

Boosting Productivity through the Tech Stack Peer-graded Assignment Solutions

Essential Design Principles for Tableau Peer-graded Assignment Solutions

Creating Dashboards and Storytelling with Tableau Peer-graded Assignment Solutions

Intro to AR/VR/MR/XR: Technologies, Applications & Issues Graded Assignments

Conversational Selling Playbook for SDRs Peer-graded Assignment Solution

Leave a Reply

Your email address will not be published. Required fields are marked *