make sentence-generator program become optional
<p>This is a code for a sentence-generator program. It asks the user to make a prepositional phrase, which is optional (it can appear with a certain probability.) I don't know how to make the phrase optional.</p>

<pre><code>import random

articles = ("A", "THE")    
nouns = ("BOY", "GIRL", "BAT", "BALL",)    
verbs = ("HIT", "SAW", "LIKED")    
prepositions = ("WITH", "BY")

def sentence():    
     """Builds and returns a sentence."""
    return nounPhrase() + " " + verbPhrase()

def nounPhrase():    
    """Builds and returns a noun phrase."""
    return random.choice(articles) + " " + random.choice(nouns)

def verbPhrase():    
    """Builds and returns a verb phrase."""
    return random.choice(verbs) + " " + nounPhrase() + " " + prepositionalPhrase()

def prepositionalPhrase():    
    """Builds and returns a prepositional phrase."""
    return random.choice(prepositions)+ " " + nounPhrase()

def main():    
    """Allows the user to input the number of sentences to generate."""
    number = input("Enter the number of sentences: ")
    for count in xrange(0, number):
        print sentence()

main()
</code></pre>
