title: User input in prolog
body: <p>I want to write a program that sets cold to true if the user enters winter and sets warm to true if the user enters summer. This is what I have so far:</p>
  
  <pre><code>start :- write('What season is it?: '), read(X), season(X).  
  cold :- season(winter).  
  warm :- season(summer).
  </code></pre>
  
  <p>However when I query start and enter winter for the season I get an error that season/1 is undefined. To fix this I tried changing my code to the following:</p>
  
  <pre><code>start :- season(X).  
  season(X) :- write('What season is it?: '), read(X).  
  cold :- season(winter).  
  warm :- season(summer).  
  </code></pre>
  
  <p>Now when I query start it asks for the season as expected and I entered winter. I queried cold expecting a return of true since I figured season(winter) would be true, but instead I was again prompted to answer "what season is it?". How can I make this simple program work?</p>