私はいくつかの電気部品の税金を計算する簡単なプログラムを書きました、それはこのようになります:
print "How much does it cost?",
price = raw_input()
print "Tax: %s" % (price * 0.25)
print "Price including tax: %s" % (price * 1.25)
raw_input ("Press ENTER to exit")
そして、私はこのエラーを受け取り続けます:
Traceback (most recent call last):
File "moms.py", line 3, in <module>
print "Tax: %s" % (price * 0.25)
TypeError: can't multiply sequence by non-int of type 'float'