Created
September 28, 2015 23:50
-
-
Save kblake/9caeb8ac8db52783d03d to your computer and use it in GitHub Desktop.
Histogram
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test_scores = [88, 100, 93, 65, 89, 90, 78, 99, 54] | |
If given an array of integers, display a horizontal histogram using ‘*’ | |
For example, | |
Produce: | |
88 : **************************************************************************************** | |
100: **************************************************************************************************** | |
93 : ********************************************************************************************* | |
65 : ***************************************************************** | |
89 : ***************************************************************************************** | |
90 : ****************************************************************************************** | |
78 : ****************************************************************************** | |
99 : *************************************************************************************************** | |
54 : ****************************************************** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment