擅长:python、mysql、java
<p>您正在将此行中的浮动当前账单金额转换为int</p>
<pre><code>print("Your current total cost is " + "£" + str(int(current)))
</code></pre>
<p>而是使用此命令打印当前账单金额。你知道吗</p>
<pre><code>print("Your current total cost is " + "£" + "{0:.2f}".format(round(current,2)))
</code></pre>
<p>输出</p>
<pre><code>Your current total cost is £5.50
</code></pre>