Created
October 22, 2019 15:14
-
-
Save marcossevilla/cacacf7a0bb7d91c9a085e5575394d43 to your computer and use it in GitHub Desktop.
A silly World War game, randomized and written in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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