Python UnboundLocalError "Need help"
<pre><code>def rotate_word(word,number)
    for i in word:
        word_num = ord(i)
        new_word += chr(word_num + number)
return new_word
</code></pre>

<p>Hi guys, the code above is not working. This is a python function. When i run the program i will return an error: "UnboundLocalError: 'new_word' referenced before assignment"</p>

<p>what this means? Can anyone help me?</p>

<p>the output of my function would be: </p>

<p>print rotate_word('abc',5)</p>

<p>output: fgh</p>
