When you perform an assignment to a variable name within a function, it will create a local variable unless the global
statement is used. Try adding the following line to the top of your pick
function:
global morality
Or better yet, just have your pick
function return the morality value and then when you make the call use morality = pick()
.
For a more thorough explanation of the global
statement, see this blog post:
http://freepythontips.wordpress.com/2013/07/28/the-use-of-return-and-global-keywords/