text: fry_lists = {'1': ["a","about","all","am","an","and","are","as","at","be","been","but","by","called","can","come","could","day","did","do","down","each","find","first","for","from","get","go","had","has","have","he","her","him","his","how","I","if","in","into","is","it","its","like","long","look","made","make","many","may","more","my","no","not","now","number","of","on","one","or","other","out","part","people","said","see","she","so","some","than","that","the","their","them","then","there","these","they","this","time","to","two","up","use","was","water","way","we","were","what","when","which","who","will","with","words","would","write","you","your"], 
      '2':["after","again","air","also","America","animal","another","answer","any","around","ask","away","back","because","before","big","boy","came","change","different","does","end","even","follow","form","found","give","good","great","hand","help","here","home","house","just","kind","know","land","large","learn","letter","line","little","live","man","me","means","men","most","mother","move","much","must","name","need","new","off","old","only","our","over","page","picture","place","play","point","put","read","right","same","say","sentence","set","should","show","small","sound","spell","still","study","such","take","tell","things","think","three","through","too","try","turn","us","very","want","well","went","where","why","work","world","years"], 
      '3':["above","add","almost","along","always","began","begin","being","below","between","book","both","car","carry","children","city","close","country","cut","don’t","earth","eat","enough","every","example","eyes","face","family","far","father","feet","few","food","four","girl","got","group","grow","hard","head","hear","high","idea","important","Indian","it’s","keep","last","late","leave","left","let","life","light","list","might","mile","miss","mountains","near","never","next","night","often","once","open","own","paper","plant","real","river","run","saw","school","sea","second","seem","side","something","sometimes","song","soon","start","state","stop","story","talk","those","thought","together","took","tree","under","until","walk","watch","while","white","without","young"], 
      '4':["across","against","area","become","best","better","birds","black","body","certain","cold","color","complete","covered","cried","didn’t","dog","door","draw","during","early","easy","ever","fall","farm","fast","field","figure","fire","fish","five","friends","ground","happened","heard","himself","hold","horse","hours","however","hundred","I’ll","king","knew","listen","low","map","mark","measure","money","morning","music","north","notice","numeral","order","passed","pattern","piece","plan","problem","products","pulled","questions","reached","red","remember","rock","room","seen","several","ship","short","since","sing","slowly","south","space","stand","step","sun","sure","table","today","told","top","toward","town","travel","true","unit","upon","usually","voice","vowel","war","waves","whole","wind","wood"], 
      '5':["able","ago","among","ball","base","became","behind","boat","box","bread","bring","brought","building","built","cannot","carefully","check","circle","class","clear","common","contain","correct","course","dark","decided","deep","done","dry","English","equation","explain","fact","feel","filled","finally","fine","fly","force","front","full","game","gave","government","green","half","heat","heavy","hot","inches","include","inside","island","known","language","less","machine","material","minutes","note","nothing","noun","object","ocean","oh","pair","person","plane","power","produce","quickly","ran","rest","road","round","rule","scientists","shape","shown","six","size","special","stars","stay","stood","street","strong","surface","system","ten","though","thousands","understand","verb","wait","warm","week","wheels","yes","yet"], 
      '6':["anything","arms","beautiful","believe","beside","bill","blue","brother","can’t","cause","cells","center","clothes","dance","describe","developed","difference","direction","discovered","distance","divided","drive","drop","edge","eggs","energy","Europe","exercise","farmers","felt","finished","flowers","forest","general","gone","grass","happy","heart","held","instruments","interest","job","kept","lay","legs","length","love","main","matter","meet","members","million","mind","months","moon","paint","paragraph","past","perhaps","picked","present","probably","race","rain","raised","ready","reason","record","region","represent","return","root","sat","shall","sign","simple","site","sky","soft","square","store","subject","suddenly","sum","summer","syllables","teacher","test","third","train","wall","weather","west","whether","wide","wild","window","winter","wish","written"], 
      '7':["act","Africa","age","already","although","amount","angle","appear","baby","bear","beat","bed","bottom","bright","broken","build","buy","care","case","cat","century","consonant","copy","couldn’t","count","cross","dictionary","died","dress","either","everyone","everything","exactly","factors","fight","fingers","floor","fraction","free","French","gold","hair","hill","hole","hope","ice","instead","iron","jumped","killed","lake","laughed","lead","let’s","lot","melody","metal","method","middle","milk","moment","nation","natural","outside","per","phrase","poor","possible","pounds","pushed","quiet","quite","remain","result","ride","rolled","sail","scale","section","sleep","smiled","snow","soil","solve","someone","son","speak","speed","spring","stone","surprise","tall","temperature","themselves","tiny","trip","type","village","within","wonder"], 
      '8':["alone","art","bad","bank","bit","break","brown","burning","business","captain","catch","caught","cents","child","choose","clean","climbed","cloud","coast","continued","control","cool","cost","decimal","desert","design","direct","drawing","ears","east","else","engine","England","equal","experiment","express","feeling","fell","flow","foot","garden","gas","glass","God","grew","history","human","hunting","increase","information","itself","joined","key","lady","law","least","lost","maybe","mouth","party","pay","period","plains","please","practice","president","received","report","ring","rise","row","save","seeds","sent","separate","serve","shouted","single","skin","statement","stick","straight","strange","students","suppose","symbols","team","touch","trouble","uncle","valley","visit","wear","whose","wire","woman","wrote","yard","you’re","yourself"], 
      '9':["addition","army","bell","belong","block","blood","blow","board","bones","branches","cattle","chief","compare","compound","consider","cook","corner","crops","crowd","current","doctor","dollars","eight","electric","elements","enjoy","entered","except","exciting","expect","famous","fit","flat","fruit","fun","guess","hat","hit","indicate","industry","insects","interesting","Japanese","lie","lifted","loud","major","mall","meat","mine","modern","movement","necessary","observe","park","particular","planets","poem","pole","position","process","property","provide","rather","rhythm","rich","safe","sand","science","sell","send","sense","seven","sharp","shoulder","sight","silent","soldiers","spot","spread","stream","string","suggested","supply","swim","terms","thick","thin","thus","tied","tone","trade","tube","value","wash","wasn’t","weight","wife","wings","won’t"], 
      '10':["action","actually","adjective","afraid","agreed","ahead","allow","apple","arrived","born","bought","British","capital","chance","chart","church","column","company","conditions","corn","cotton","cows","create","dead","deal","death","details","determine","difficult","division","doesn’t","effect","entire","especially","evening","experience","factories","fair","fear","fig","forward","France","fresh","Greek","gun","hoe","huge","isn’t","led","level","located","march","match","molecules","northern","nose","office","opposite","oxygen","plural","prepared","pretty","printed","radio","repeated","rope","rose","score","seat","settled","shoes","shop","similar","sir","sister","smell","solution","southern","steel","stretched","substances","suffix","sugar","tools","total","track","triangle","truck","underline","various","view","Washington","we’ll","western","win","women","workers","wouldn’t","wrong","yellow"]}
  
  html_template = '''
  <!DOCTYPE html>
  <html lang="en">
  <head><title>{title}</title></head>
  <body style="background-color:darkslategrey;color:floralwhite;text-align:center;font-size:200%;font-family:Cambria,Cochin,Georgia,Times,serif">
  <div style="font-size:200%" id="titleDiv">{title}</div>
  <p> </p>
  <div id="buttonDiv">
  <button onclick="newWord()" id="newWordButton" style="background-color:royalblue;color:floralwhite;font-size:150%;font-family:Cambria,Cochin,Georgia,Times,serif">New Word</button>
  </div>
  <div id="wordListDiv" style="font-size:50%"></div>
  <p> </p>
  <div id="wordDiv" style="background-color:darkslategrey;color:darkslategrey;font-size:300%">...</div>
  <p> </p>
  
  <table style="width:100%;margin-left:auto;margin-right:auto">
  <tr><th>Team 1</th><th>Team 2</th></tr>
  <tr>
      <td>
      <button onclick="subtractPoint1()" id="subtractPoint1Button" style="background-color:firebrick;color:floralwhite;font-size:80%;font-family:Cambria,Cochin,Georgia,Times,serif">-1 Point</button>
      <button onclick="addPoint1()" id="addPoint1Button" style="background-color:green;color:floralwhite;font-size:80%;font-family:Cambria,Cochin,Georgia,Times,serif">+1 Point</button>
      </td>
      <td>
      <button onclick="subtractPoint2()" id="subtractPoint2Button" style="background-color:firebrick;color:floralwhite;font-size:80%;font-family:Cambria,Cochin,Georgia,Times,serif">-1 Point</button>
      <button onclick="addPoint2()" id="addPoint2Button" style="background-color:green;color:floralwhite;font-size:80%;font-family:Cambria,Cochin,Georgia,Times,serif">+1 Point</button>
      </td>
  </tr>
  <tr>
  <td><div id="points1Div">Points: 0</div></td>
  <td><div id="points2Div">Points: 0</div></td>
  </tr>
  </table>
  
  <p> </p>
  
  <div id="countdownButtonsDiv">
      <button onclick="startTimer()" id="startTimer" style="background-color:darkgreen;color:floralwhite;font-size:60%;font-family:Cambria,Cochin,Georgia,Times,serif">Start Timer</button>
  </div>
  <div id="countdownDiv" style="color:honeydew;font-size:200%"></div>
  
  <p></p>
  
  <div id="restartButtonDiv">
      <button onclick="restart()" id="restart" style="background-color:darkred;color:floralwhite;font-family:Cambria,Cochin,Georgia,Times,serif">Restart</button>
  </div>
  <div id="backLinkDiv">
      <a href="index.html" style="color:floralwhite;font-size:50%;font-family:Cambria,Cochin,Georgia,Times,serif">Back to Home</a>
  </div>
  
  <script>
      var wordList = {list};
      var timerLength = 90;
      document.getElementById("countdownDiv").innerText = timerLength;
      document.getElementById("wordListDiv").innerText = wordList.length + " words left";
      function newWord() {{
          document.getElementById("wordDiv").style.backgroundColor = "floralwhite";
          document.getElementById("wordDiv").style.color = "royalblue";
          var randomNumber = Math.floor(Math.random() * wordList.length);
          var word = wordList[randomNumber];
          document.getElementById("wordDiv").innerText = word;
          wordList.splice(randomNumber,1);
          document.getElementById("wordListDiv").innerText = wordList.length + " words left";
          if (wordList.length == 0) {{
              document.getElementById("newWordButton").disabled = true;
              document.getElementById("addPoint1Button").disabled = true;
              document.getElementById("subtractPoint1Button").disabled = true;
              document.getElementById("addPoint2Button").disabled = true;
              document.getElementById("subtractPoint2Button").disabled = true;
              document.getElementById("newWordButton").style.color = "darkslategrey";
              document.getElementById("newWordButton").style.backgroundColor = "darkslategrey";
          }}
      }}
      var points1 = 0;
      var points2 = 0;
      function addPoint1() {{
          points1++;
          document.getElementById("points1Div").innerText = "Points: " + points1;
          newWord();
      }}
      function addPoint2() {{
          points2++;
          document.getElementById("points2Div").innerText = "Points: " + points2;
          newWord();
      }}
      function subtractPoint1() {{
          points1--;
          document.getElementById("points1Div").innerText = "Points: " + points1;
          newWord();
      }}
      function subtractPoint2() {{
          points2--;
          document.getElementById("points2Div").innerText = "Points: " + points2;
          newWord();
      }}
      function startTimer() {{
          var time = timerLength;
          document.getElementById("startTimer").disabled = true;
          document.getElementById("newWordButton").disabled = false;
          var countdown = setInterval(function() {{
              document.getElementById("countdownDiv").style.color = "honeydew";
              document.getElementById("countdownDiv").innerText = time;
              time--;
              if (time < 0) {{
                  clearInterval(countdown);
                  document.getElementById("countdownDiv").style.color = "darkred";
                  document.getElementById("newWordButton").disabled = true;
                  document.getElementById("countdownDiv").innerText = timerLength;
                  document.getElementById("startTimer").disabled = false;
              }}
          }},1000);
      }}
  
      function restart() {{
          location.reload();
      }}
  </script>
  
  </body>
  </html>
  '''
  
  for grade in fry_lists:
      title = 'Word Game ' + grade
      list = fry_lists[grade]
      with open(grade + '.html', 'w') as f:
          html_string = html_template.format(title=title, list=list)
          f.write(html_string)
          f.close()
  
      