Skip to content

Instantly share code, notes, and snippets.

@marcossevilla
Created October 22, 2019 15:14
Show Gist options
  • Save marcossevilla/cacacf7a0bb7d91c9a085e5575394d43 to your computer and use it in GitHub Desktop.
Save marcossevilla/cacacf7a0bb7d91c9a085e5575394d43 to your computer and use it in GitHub Desktop.
A silly World War game, randomized and written in Python
from random import randrange
parts = {
"USA": randrange(1, 100),
"Germany": randrange(1, 100),
"Russia": randrange(1, 100)
}
keys = list(parts.keys())
values = list(parts.values())
winner = keys[values.index(max(parts.values()))]
print(f"{winner} wins this time.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment