Corrected 031 and 059 to work with the loader script

This commit is contained in:
Correl Roush 2011-04-06 23:38:53 -04:00
parent 43ecfff029
commit aeee2c599f
2 changed files with 7 additions and 2 deletions

View file

@ -25,6 +25,9 @@ def combinations(amount, denominations):
n += 1
return total
if __name__ == '__main__':
def main():
coins = [200, 100, 50, 20, 10, 5, 2, 1]
print combinations(200, coins)
if __name__ == '__main__':
main()

View file

@ -87,7 +87,7 @@ def get_key(encrypted, key_len=3):
return sorted([s for s in scored if s[0] > 1])
if __name__ == '__main__':
def main():
#e = encrypt('Myles is a ridiculous dog who loves his bone', 'amz')
#print get_key(e)
with open(os.path.join(os.path.dirname(__file__), 'p059', 'cipher1.txt'), 'r') as codefile:
@ -99,3 +99,5 @@ if __name__ == '__main__':
print d
print 'Sum:', sum([ord(c) for c in d])
if __name__ == '__main__':
main()