<div>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.</div>
<div> </div><div>def pounds():<br> h_book=weight('Hardback',2.1)<br> p_book=weight('Paperback',1.3)<br> print('Your total weight of book(s) at',pounds)<br> return pounds</div><div>def weight(desc,weight):<br>
print('How many',desc,'books do you want at',weight,'pounds do you want?')<br> num=int(input())<br> pounds=float(num*weight)<br clear="all"><br>-- <br>Amanda Colley<br>
</div>