Hi all, I m fairly new to programming so I am sorry if this is a simple answer. I am writing a program that creates a bar graph using a list of numbers. I am having problems multiplying the list object, which are all integers below 16. The reason I am multiplying is to get a clearer visualization of the graph, here is the code.
The problem is on the last part of the print statement, 2 is the only number that will work, which is obviously not what I want. I am using a graphing tool that my school has provided called quickdraw. Its frame is 800x600 pixels so it should seemingly fit within the range.
Is their something wrong with the code or is it due to the school program?
Code:
Col1 = [9, 10, 14, 9, 4, 3, 6, 5, 5, 2] Bwid = 100 b = 0 xpivot = 32 while b < len(Col1): print "fillrect", xpivot, 380, Bwid / len(Col1), Col1[b] * 2 xpivot = xpivot + 32 b = b + 1
Is their something wrong with the code or is it due to the school program?
Comment