Doubt

AttributeError Traceback (most recent call last)
in
----> 1 t.inputprice()

in inputprice(self)
7
8 def inputprice(self):
----> 9 self.price=[float(input(“Enter the price”+str(i+1)+“:”)) for i in range(self.n)]
10
11 class gold(commodities):

AttributeError: ‘commodities’ object has no attribute ‘n’

Hi Abhilash,



Can you please share the code so that we can get more idea what the error is.