ここに私のコードです。 print
文字列の最後にパーセント記号を追加する必要があります。私はこれを理解できません。Pythonスクリプトに%記号を追加する方法
total = 0
counter = 0
while True:
score = int(input('Enter test score: '))
if score == 0:
break
total += score
counter += 1
average = total/counter
print('The average is:', format(average, ',.3f'))
'format'とは何ですか? –
重複がありますか? http://stackoverflow.com/questions/10678229/how-can-i-selectively-escape-percent-in-python-strings –
@PeterWood [組み込み関数](https://docs.python.org)です。 /3/library/functions.html#format)。 – poke