Re: [Tutor] Problems ugh help please

2012-10-13 Thread Steven D'Aprano
On 14/10/12 07:17, Amanda Colley wrote: 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. My guess is that here you are doing something like: "weight is {:f}".format(weight) but

Re: [Tutor] Problems ugh help please

2012-10-13 Thread Alan Gauld
On 13/10/12 21:17, Amanda Colley wrote: I am trying to add the total pounds that will be shipped. I keep getting an error Show us the full error text do not summarize. We lose a lot of information that way and have to workj much harder to guess/figure out what is going wrong. def pounds():

Re: [Tutor] Problems ugh help please

2012-10-13 Thread Mark Lawrence
On 13/10/2012 21:17, Amanda Colley wrote: 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 when it exicutes. here is the co

[Tutor] Problems ugh help please

2012-10-13 Thread Amanda Colley
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 when it exicutes. here is the code I have. def pounds(): h_book=weight(