cbg-ethz / shorah

Repo for the software suite ShoRAH (Short Reads Assembly into Haplotypes)
GNU General Public License v3.0
39 stars 14 forks source link

Index Error when there is a value at the index #15

Closed bbravo closed 9 years ago

bbravo commented 9 years ago

infile Mary 15 Joe 13 Dustin 12 code name=" " age=0 average_age = 0 invites={} infile = open("party.txt", "r") for line in infile: parts=line.split() print parts #prints the correct values name=parts[0] #gives me index error here age=parts[1] # also here average_age += age invites[name]=age infile.close() average_age /= float(len(age)) print ("%.1f %s" % (average_age))

ozagordi commented 9 years ago

Not relevant.