0
所以,我再次製作一個表格(數學表格)檢查器來檢查你的答案。我使用了搜索,但沒有發現任何相關內容。有多少個答案?
def math():
for f in range (3):
right=0
wrong=0
x=10
c=5
p=x*c
print x,'times',c
v=read_number('What is the answer?')
if p==v:
right=right+1
print 'You got it right!'
else:
wrong=wrong+1
print 'You got it wrong.'
for h in range (1)
print 'You got',right,'right, and',wrong,'wrong'
的問題是,當我這樣做,我得到的最後一個錯誤,以測試它,它說:「你有正確的0和1個錯」像它不登記的答案。我究竟做錯了什麼?
提示:你問了多少次「答案是什麼」?你設置了多少次'right = 0'和'wrong = 0'? [PS:那不可能是你的代碼,'(1)'後面有一個冒號冒號。] – DSM