[Tutor] What can I do with this code?

Nathan Pinno falcon3166 at hotmail.com
Wed Aug 10 01:59:31 CEST 2005

I coded the following just for fun:

import random
cool = ['Cool math!','Awesome!','Way to go!','Happy problem solving!']
while 1:
    start = raw_input("Do you want to do some math? Yes or No")
    if start == "Yes":
        x = int(raw_input("First number:"))
        y = int(raw_input("Second number:"))
        print x*y
        print random.choice(cool)
    elif start == "No":
print "Goodbye and happy problem solving!"

What can I do with it, other than let it be a fun example of coding?

Early to bed,
Early to rise,
Makes a man healthy, wealthy, and wise.
--Benjamin Franklin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050809/2b5146d1/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pinno, Nathan Paul.vcf
Type: text/x-vcard
Size: 783 bytes
Desc: not available
Url : http://mail.python.org/pipermail/tutor/attachments/20050809/2b5146d1/PinnoNathanPaul.vcf

More information about the Tutor mailing list