Error when defining variables within a defined function (Python) : <p>Consider the following code (I received a name error when running this)</p>

<pre><code>item = input("What food???")
def itemcheck():
    if item == "chex":
        cereal = "Yummy"
    else:
        cereal = "Yuck!"

itemcheck()
print(cereal)
</code></pre>

<p>the error was name 'cereal' is not defined. What error am I making/how do I fix it? What is the correct way to define a variable in your own function?</p>
