Skip to content

Instantly share code, notes, and snippets.

@NanoSmasher
Created July 6, 2015 15:49
Show Gist options
  • Save NanoSmasher/0cf2bac9d63c12bb9605 to your computer and use it in GitHub Desktop.
Save NanoSmasher/0cf2bac9d63c12bb9605 to your computer and use it in GitHub Desktop.
Used to convert number of wins for each pair of people to create a [n] x [n] matchup chart
n = input("Size of Chart[2-26]: ")
from string import uppercase as c
s = ""
for i in range(2,n+2):
e = ""
for j in range(2,n+2):
if i == j:
e += "X\t"
else:
e += "=100*$Raw." + c[j-1]+str(i) + "/($Raw." + c[j-1]+str(i) +" +$Raw." + c[i-1]+str(j) +")\t"
s += e+"\n"
f = open("matchup.txt", "w")
f.write(s)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment