Skip to content

Instantly share code, notes, and snippets.

@thomasaarholt
Created May 23, 2021 18:08
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 thomasaarholt/ce770b389d051a7a28ee1b89e314371b to your computer and use it in GitHub Desktop.
Save thomasaarholt/ce770b389d051a7a28ee1b89e314371b to your computer and use it in GitHub Desktop.
fortune = 500_000_000
total_americans = 327_000_000
americans_lives_changed = 0
for american in range(total_americans):
if fortune - 1_000_000 >= 0:
fortune -= 1_000_000
americans_lives_changed += 1
else:
raise ValueError(f"Uh oh! He ran out of money! Lives changed: {americans_lives_changed}")
print(f"Amazing! We changed {americans_lives_changed} american lives!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment