擅长:python、mysql、java
<p>你需要另一个计算小时数的变量。然后只打印循环中的两个变量。在</p>
<p>您还需要在<code>while</code>中反转测试。当咖啡因含量至少为65毫克时,你要保持循环。在</p>
<pre><code>def main():
cup = float(input("Enter number of cups of coffee:"))
caff = cup * float(130)
hours = 0
while caff >= 65:
caff -= caff * float(0.13)
hours += 1
print(hours, caff)
main()
</code></pre>