Skip to content

Instantly share code, notes, and snippets.

@blackknight36
Created December 16, 2020 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blackknight36/60c97af52a98a89815d3e95a8be5df1e to your computer and use it in GitHub Desktop.
Save blackknight36/60c97af52a98a89815d3e95a8be5df1e to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
gifts = [
{'name':'partridge', 'total':0},
{'name':'turtle_doves', 'total':0},
{'name':'french_hens', 'total':0},
{'name':'calling_birds', 'total':0},
{'name':'golden_rings', 'total':0},
{'name':'geese', 'total':0},
{'name':'swans', 'total':0},
{'name':'maids', 'total':0},
{'name':'ladies', 'total':0},
{'name':'lords', 'total':0},
{'name':'pipers', 'total':0},
{'name':'drummers', 'total':0},
]
for x in range(0, len(gifts)):
gifts[x]['total'] = (12-x)*(x+1)
print(f"{gifts[x]['name']}: {gifts[x]['total']}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment