# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.

__author__="UShareSoft"

def print_graph(values):
        max=0
        for v in values:
                if len(v)>max:
                        max=len(v)
        for v in values:
                if len(v)<max:
                        newV=v+(" " * int(max-len(v)))
                        if values[v]!=-1:
                                print newV, values[v]*'|'+'-'*int(50-values[v])
                        else:
                                print newV,20*'-'+"UNLIMITED"+21*'-'
                else:
                        if values[v]!=-1:
                                print v, values[v]*'|'+'-'*int(50-values[v])
                        else:
                                print v,20*'-'+"UNLIMITED"+21*'-'
                        
                        

@@ -1,180 +1,4 @@
-# To change this license header, choose License Headers in Project Properties.%0A# To change this template file, choose Tools %7C Templates%0A# and open the template in the editor.%0A%0A
 __au
@@ -165,32 +165,71 @@
 or v in values:%0A
+                value = int(values%5Bv%5D)%0A
                 
@@ -322,36 +322,32 @@
         if value
-s%5Bv%5D
 !=-1:%0A          
@@ -381,28 +381,24 @@
  newV, value
-s%5Bv%5D
 *'%7C'+'-'*int
@@ -398,36 +398,32 @@
 '-'*int(50-value
-s%5Bv%5D
 )%0A              
@@ -561,20 +561,16 @@
 if value
-s%5Bv%5D
 !=-1:%0A  
@@ -613,20 +613,16 @@
 v, value
-s%5Bv%5D
 *'%7C'+'-'
@@ -630,28 +630,24 @@
 int(50-value
-s%5Bv%5D
 )%0A          
@@ -736,54 +736,4 @@
 '-'%0A
-                        %0A                        %0A

Fix bug in the ascii bar graph