hi;
-----------------------
check=(1,2,3,4,5,6,7,8,9,"/","*","-","+","(",")","[","]")

while True:
    a=raw_input("type your query : \n")
    c=set(a).intersection(set(check))

    if c:
        print *eval("float(%s)"%a)*
    else:
        print "error! please use -defined operators-!"
-----------------------------

this script works.. but if i type

15/8

it returns 1.. no floatin'.. i must fix this? can anyone help me?
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to