Question: Please help me with this Python assignment. The following Python script is missing a class and a function. def start_my_program(): # define the objects in
Please help me with this Python assignment.
The following Python script is missing a class and a function.
def start_my_program(): # define the objects in our Yard Sale items = [ YardSaleItem("tv", 200.00), YardSaleItem("ipod", 25.00), YardSaleItem("speakers", 350.00), YardSaleItem("ottoman", 20.00), YardSaleItem("dresser", 100.00), YardSaleItem("purse", 2000.00), YardSaleItem("jacket", 7.50) ]
print ('Welcome to the garage sale.') print ('This is what I have for sale:') for item in items: item.display_details()
if __name__ == "__main__": start_my_program()
I have tried to write a function YardSaleItem shown as the following. The item in list items can't be displayed.
def YardSaleItem(item, price):
s=" - ";
seq=(item, str(price));
return s.join(seq)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
