[Tutor] Wrapping my head around global variables!!
Peter Otten
__peter__ at web.de
Fri Jan 28 17:21:18 CET 2011
Nevins Duret wrote:
> Hello Python collective,
>
> I am trying to wrap my head around what exactly is causing me
> not to get any output or error message in the following code:
>
>> #!/usr/bin/env python3.1
>>
>> import random
>>
>> def main():
>>
>> def chosen_letter():
>>
>> chosen_letter = Consonant()
>> chosen_letter = Vowel()
>>
>> return chosen_letter
Hint: what function are you leaving with the above return statement?
I won't spoil you the fun of tackling the other problems with your code, one
at a time. Come back here for those you can't handle yourself.
>> if __name__ == "__main__": main()
More information about the Tutor
mailing list