title: Python - Words in a file: color or colour? (Grok Learning)
body: <p><strong>This is a problem on Introduction to Programming 2 on Grok Learning that I am having some trouble with this so please be simple in your coding as I'm new.</strong> 
  <em>The problem is as follows:</em> </p>
  
  <p>Write a program that reads in a word (e.g. colour or color) and checks if it occurs in the file book.txt, printing out  was found in the book. or  was not found in the book..</p>
  
  <p>For example, given the book.txt file:</p>
  
  <p>book.txt <strong>(This is the first file provided to you by grok)</strong></p>
  
  <p>He looked out from the top of the mountain .
  The colour of the sky was amazing .
  Reds , oranges and pinks faded into a hazy blue.
  then your program should work like this:</p>
  
  <p>Word to look for: colour
  colour was found in the book.</p>
  
  <p>book.txt           <strong>(This is the second file provided to you by Grok)</strong></p>
  
  <p>Hypothesize ? How was she going to form a
  hypothesis when she didn't even know what the
  rest of the data looked like ?
  then your program should work like this:</p>
  
  <p>Word to look for: hypothesize
  hypothesize was found in the book.
  This is the code that I have for it as of now.</p>
  
  <pre><code>open('book.txt')
  word = input('Word to look for: ')
  
  if word in open('book.txt').read() or open('book.txt2').read():
  
    print(word + " was found in the book.")
  
  else:
  
    print(word + " was not found in the book.")
  </code></pre>
  
  <ul>
  <li>The code has troubles when the user inputs "color", even though it is not in either files but seems to have no problem with other words. </li>
  </ul>