Thanks mawe, that will come in handy! Also thanks to vegaseat for the beauty of a bar graph made with Tkinter, that is my first intro to Tkinter. Looks like GUI programming is much simpler than with other languages.
Mawe sure knows how to keep it simple and elegant! Here is my contribution to mawe's original horizontal bar graph, I added one line of actual data value markers to the end, still simple:
data = [20, 15, 10, 7, 5, 4, 3, 2, 1, 1, 0]
# pad each bar with spaces to total length of max(data), here 20
bar_list = 
for x in data:
str1 = "#" * x
# space pad to the right
str2 = str1.ljust(max(data))
# test it, also show data value marker at end
for index, item in enumerate(bar_list):
print item, ' -', data[index]
Edited 6 Years Ago by vegaseat: changed php tags to code tags
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...