擅长:python、mysql、java
<p>我建议根据<a href="https://www.python.org/dev/peps/pep-0008/#function-and-variable-names" rel="nofollow noreferrer">PEP8</a>中设置的约定使用f字符串和名称变量</p>
<blockquote>
<p>Function names should be lowercase, with words separated by
underscores as necessary to improve readability.</p>
<p>Variable names follow the same convention as function names.</p>
</blockquote>
<p>所以代码可以是这样的:</p>
<pre><code>customer = input('Enter Customer Name: ')
quantity = int(input("Enter Quantity Purchased: "))
unit_price = int(input("Enter unit price: ")
print(f"Customer name: {customer}")
print(f"Sales amount: {quantity * unit_price}")
</code></pre>