title: Using While True loops
body: <p>I am supposed to write a code that checks a word for certain syllables (examples: <em>in</em>, <em>ex</em>, <em>are</em>). If the word is made up of only those syllables, the code returns "<em>Yes</em>" and "<em>No</em>" otherwise (if the word also contains other syllables). The assignment requires me to use a <code>while true</code> loop, and while I came up with a simpler way to make this code work, I don't quite know where to start in making a <code>while true</code> loop for this problem. </p>
  
  <p>My current code only works for words that <em>have</em> all the syllables:</p>
  
  <pre><code>def check(word):
      pos = 0
      while True:
          if pos &lt; len(word):
              if word[pos:pos+2] == "in":
                  pos += 2 
                  break
              if word[pos:pos+2] == "ex":
                  pos += 2
                  break
              if word[pos:pos+3] == "are":
                  pos += 3 
                  break
      return "YES"
  </code></pre>