[Tutor] import probs

jason hochstein bigapple631 at optonline.net
Fri Aug 13 21:30:49 CEST 2004

I am trying to figure out why my I can't get one module to import to the other. Here is what I have.

print "Welcome to the age program."
print "This program will determine whether you are a child, adult, legal to drink beer or a senior citizen."
age = input("How old are you? ")
if age < (18):

    print "Congratulations, your a kid."

elif age == (19 or 20):
    print "Congratulations, you're an adult."

elif age >= (21) and age < (65):
    print "Congratulations, you're old enough to drink."

elif age > (65):
    print "Congratulations, you're a senior citizen. You get a discount for being old."

import add

print " Thank you for trying this product. Please come again."

exit = input ()

here is what the import add is: 

def add():
    print "Your age divided by 2 is", age / 2
    print "Your age times 10 is", age * 10
    print "I hope this works. "

They are both in the same directory on my c drive as well.
It wont import it.??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20040813/e203b786/attachment.html

More information about the Tutor mailing list