Computer science skill path project: Receipts for Lovely Loveseats

Hi, I just started Codecademy computer science last week and I am stuck on a project. it says my line on 13 is a “TypeError: must be str, not float”. I tried everything to fix it but nothing works. I made it into a string but it does not look like a receipt.

here is my code:

lovely_loveseat_description = “lovely loveseat. Tuffed polyester blend on wood. 32 inches high * 40 inches wide * 30 inches deep. red or white.”

lovely_loveseat_price = 254.00

stylish_settee_description = “Stylish Settee. Faux leather on birch. 29.50 inches high * 54.75 inches wide * 28 inches deep. black.”

stylish_settee_price = 180.50

Luxurious_lamp_description = “Luxurious Lamp. Glass and iron. 36 inches tall. brown with cream shade”

luxurious_lamp_price = 52.15

sale_tax = .088

customer_one_total = 0

customer_one_itemization = “”

customer_one_total += lovely_loveseat_price

customer_one_itemization += lovely_loveseat_description

customer_one_total += luxurious_lamp_price

customer_one_itemization += luxurious_lamp_price

customer_one_tax = customer_one_total * sale_tax

customer_one_total += sale_tax

print(“Customer One Items:”)

print(customer_one_itemization)

print(“Customer One Total:”)

print(customer_one_total)

Did you mean to write,

customer_one_total += customer_one_tax

Is that your line 13? If so then the type on the right does not match the type of the left. Augmented assignment depends on type match. luxurious_lamp_price is a float, not a string

2 Likes

I must’ve misspelled something or I was overthinking it. I restarted the project and did it again with a walk-through video and I was able to finish it. Thanks for the help!

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.