Create a Histogram

What You'll Be Building

In this project, we'll write a program that takes a user's input, then builds a hash from that input. Each key in the hash will be a word from the user; each value will be the number of times that word occurs. For example, if our program gets the string "the rain in Spain falls mainly on the plain," it will return

the 2
falls 1
on 1
mainly 1
in 1
rain 1
plain 1
Spain 1

A visual representation of data like this is called a histogram.


Hit Run to start building your own histogram!

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.