Please help me Understand Classes. See below code.

total_weight_of_all_parts=0

totalnumber_of_parts=int(input("Input the total number of different parts you want to calculate the weight: ")) class Metal: def __init_(self,length,width,thickness,quantity): self.thickness=thickness self.width=width self.length=length self.quantity=quantity self.weight=thicknesswidthlength.29 self.total_weight=quantityself.weight def details(self): print("the parts weight is",self.weight,"there is a total of",quantity,"pieces, the total weight is",self.total_weight) for _ in range (total_number_of_parts):

x,y,z,quantity=map(float,input("List in order Thickness, width, length,& quantity: ").split())
part=Metal(x,y,z,quantity)
total_weight_of_all_parts+=part.total_weight
part.details()
print("The total weight of all parts is",total_weight_of_all_parts)
print("******NEXT PART*****************************")
total_number_of_parts-=1
/r/learnpython Thread Parent