So I can do this:
But then I get this error and the program crashes:
print('Selcted Item Quantity: ', SelectedItemQuantity) x = float(SelectedItemQuantity) y = SellPrice[0] z = float(y) print('Float Value = ', x) print('x*z= ', x*z) MaterialUsedPrice2 = x*z #Calculate the Price of Material Used # MaterialUsedPrice = SelectedItemQuantity * SellPrice print('The Total Price for the ', '(',x,')', SelectedItemName, ' Used is: $', MaterialUsedPrice2)And I get:
Output:Selcted Item Quantity: 2
Float Value = 2.0
x*z= 3.0
The Total Price for the ( 2.0 ) 1/2" PVC Coupling Used is: $ 3.0
Which is what I want,But then I get this error and the program crashes:
Error: y = SellPrice[0]
TypeError: 'NoneType' object is not subscriptable
Any way to get around/fix this?