Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want to be able to print out the name, quantity, item and price but format isn't working. class HousemateHelper: def __init__(self): pass def addPurchase(self,Name=input(What

I want to be able to print out the name, quantity, item and price but "format" isn't working.

class HousemateHelper: def __init__(self): pass def addPurchase(self,Name=input("What is your name:"),Item=input("What did you buy:"),Quantity=input("How much did you buy:"),Cost=float(input("How much was the cost:"))): self.name= Name self.item=Item self.quatity=Quantity self.cost=Cost print("{},{},{} and {}".format(self.name,self.item,self.quantity.self.cost))

#def getInventory(self,items):

f= HousemateHelper()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

What discovery of J. J. Thomson won him the Nobel Prize?

Answered: 1 week ago