title: Why does a name error appear?
body: <p>This is my program.</p>
  
  <pre><code>sentence = raw_input("Please type a sentence:" )
  while "." in sentence or "," in sentence or ":" in sentence or "?" in 
  sentence or ";" in sentence:
      print("Please write another sentence without punctutation ")
      sentence = input("Please write a sentence: ")
  else:
      words = sentence.split()
      print(words)
  specificword = raw_input("Please type a word to find in the sentence: ")
  while i in range(len(words)):
      if specificword == words[i]:
          print (specificword, "found in position ", i + 1)
      else:
          print("Word not found in the sentence")
          specificword = input("Please type another word to find in the sentence")
  </code></pre>
  
  <p>After running this program this error appears,
      Please type a sentence:hello my name is jeff
      ['hello', 'my', 'name', 'is', 'jeff']
      Please type a word to find in the sentence: jeff</p>
  
  <pre><code>Traceback (most recent call last):
    File "E:/school/GCSE Computing/A453/Task 1/code test1.py", line 9, in &lt;module&gt;
      while i in range(len(words)):
  NameError: name 'i' is not defined
  </code></pre>
  
  <p>What is wrong here?</p>