<p>想加上与字符串末尾燃烧的卡路里相关的分钟数吗</p>
<p>你想让它说“你在跑步机上用y分钟燃烧了x卡路里。”</p>
<pre><code>calories burned per minute = 4.2
for numbers in [10,15,20,25,30]: # in minutes
print('You burned', numbers * 4.2, 'calories on the treadmill. ')
</code></pre>
<p>您可以使用步骤5在10到30之间循环。然后使用新的字符串格式插入必要的计算和输出</p>
<pre><code>for i in range(10,31,5):
print(f'You burned {4.2*i} calories on the treadmill in {i} minutes.')
</code></pre>