I am trying to add the total pounds that will be shipped. I keep getting an
error of unknown format code 'f' for object of type 'str' when I try to
float the pounds. and when I dont float it it gives me a total weight of
<function pounds at 0x00000000032B92CB> when it exicutes.  here is the code
I have.

def pounds():
    h_book=weight('Hardback',2.1)
    p_book=weight('Paperback',1.3)
    print('Your total weight of book(s) at',pounds)
    return pounds
def weight(desc,weight):
    print('How many',desc,'books do you want at',weight,'pounds do you
want?')
    num=int(input())
    pounds=float(num*weight)

-- 
Amanda Colley
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to