[Tutor] Some questions about my yen-USD.py
Dick Moores
rdm at rcblue.com
Fri Sep 8 00:10:41 CEST 2006
At 07:16 AM 9/7/2006, Danny Yoo wrote:
>Hi Dick,
>
>I'm looking at the last part of the main() function:
>
>#################
>def main():
> while True:
> ...
> again()
> if again:
> break
>#################
>
>This looks a little suspicious. What does the again() function do, and is
>it supposed to return a value?
I've just seen all the answers to my original post. Thank you all.
For now, just to answer Danny's question:
Danny,
Yes. It will return anything other than "y", "Y", etc., in answer to
the prompt, "\n\nDo you want to do another calculation? Y/N: ". This
will cause a break out of the while loop and call
closingMesssage(). Too convoluted, I'm sure, but it does work.
Dick
More information about the Tutor
mailing list