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
#!/usr/bin/env bash | |
# Source: https://blog.godatadriven.com/black-formatting-selection | |
# Added debugging prints, permissioning/cleanup, and also a bugfix for | |
# selecting whole file. | |
# Print commands/arguments for debugging | |
set -x | |
# Inputs |
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
""" | |
War simulator that limits the number of rounds. | |
"Fork": https://lethain.com/war-card-game-in-python/ | |
I expanded the code to plot the probability the game of War finishes within | |
a limit on the rounds. This was part of an extra credit problem in a CS class. | |
""" | |
import random |