g = raw_input("Any other items enter the price: $")
if (g.isalpha()):
g = 0.0
if (g.isdigit()):
g = g
else:
g = 0.0
Pat=(raw_input('And how many of this item:'))
if (Pat.isalpha()):
Pat = 0.0
if (Pat.isdigit()):
Pat = Pat
else:
Pat = 0.0
g_ = (Pat * g)
Total = (a_ + b_ + c_ + d_ + e_ + f_ + g_)
print'Total: $',Total, '''
它使返回錯誤:這個程序不斷崩潰,我無法解決爲什麼?
TypeError: can't multiply sequence by non-int of type 'str'
的可能的複製[爲什麼我獲取TypeError:不能通過類型爲'float'的非int類型乘以序列?](https://stackoverflow.com/questions/485789/爲什麼 - 我 - 得到 - 類型錯誤 - 錯誤 - 乘法 - 非整型 - 浮點型) –