擅长:python、mysql、java
<p>问题在于你的书面陈述:</p>
<pre><code>print("Your purchase amount is " + purchaseAmount + "$ and shipping is free!")
</code></pre>
<p>如果要在不进行转换的情况下连接字符串和浮点,请尝试向变量添加str()强制转换:</p>
<p>即:</p>
^{pr2}$
<p>也可以使用格式:</p>
<pre><code>print("Your purchase amount is {0}$ and shipping is free!".format(purchaseAmount))
</code></pre>