Permalink
Browse files

canbuild.py: print the total at the bottom

  • Loading branch information...
1 parent 492d5cf commit a4e7b2e931728ae5df1456955fc036140bd886df @travisg travisg committed Apr 28, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 canbuild.py
View
@@ -57,8 +57,11 @@ def main():
buildlist = sorted(buildlist, key=itemgetter(1), reverse=True)
+ total = 0
for b in buildlist:
print "Planet " + str(b[0]) + " can build " + str(b[1]) + " " + s
+ total += b[1]
+ print str(total) + " total"
if __name__ == "__main__":
main()

0 comments on commit a4e7b2e

Please sign in to comment.