i have tried everything, i am trying to build in a loop to my 2 functions which 
worked fine up until my latest sorti.
please have a look if you can..............

def exchange(cash_in):    euro=1    dollar=1.35    base=50    if cash_in>base:  
      totalreturn=cash_in*dollar    else:        totalreturn=0    return 
totalreturn

def main():    amount=""    while amount<50:        print 'Sorry, cannot 
convert an amount under €50 '        amount = input('how much do you want to 
change:')    else:        total=exchange(amount)        print 'Your exchange 
comes to: ',total      main()
 
Traceback (most recent call last):  File "F:\VTOS ATHLONE\PYTHON_VTOS\foreign 
exchange\f_ex3.py", line 27, in <module>    main()  File "F:\VTOS 
ATHLONE\PYTHON_VTOS\foreign exchange\f_ex3.py", line 19, in main    
total=exchange(amount)  File "F:\VTOS ATHLONE\PYTHON_VTOS\foreign 
exchange\f_ex3.py", line 7, in exchange    totalreturn=cash_in*dollarTypeError: 
can't multiply sequence by non-int of type 'float'>>> 
 
                                          
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to