-4
我正在做一個計算機科學項目的編碼拼圖。計算機科學項目的編碼拼圖
我做得不錯,直到我遇到縮進塊錯誤。它是在線63.
任何幫助將是輝煌!
下面是代碼:
#check to see if letters used
while True:
try:
x=words.index(answer1)
answer2=raw_input('Now please type the letter you wish to replace it with')
words=words.replace(answer1,answer2)
except ValueError:
print "there is an error using this letter/symbol, try again"
break
answer2=raw_input('Now please type the letter you wish to replace it with')
words=words.replace(answer1,answer2)
if words==check:
print"Congratulations"
else:
#routine to delete a previous guess
#find #if answer1=="+":
#if answer2=="C"
# +=C
#words2=words.replace(answer1,answer2)
哪一個是該代碼示例中63行? – ODiogoSilva
任何想法63行是?我的猜測是:你註釋掉了'else'子句中的所有行,並沒有使用'pass'語句。 – Carsten