みなさん、こんにちは。これは私の最初の投稿です。コーディングを始めてまだ 1 週間ほどです。学校の先生も説明が下手なので、親切に教えてください :)ユーザーはその単語が正しいと思うものを入力します。正解した場合は 2 ポイントが与えられ、1 文字間違えた場合は 1 ポイントが与えられ、1 文字以上間違っていた場合は与えられた 0 点。将来、ユーザーはログインする必要がありますが、最初にこの部分に取り組んでいます。これを機能させる方法はありますか?
score = score
definition1 = "the round red or green fruit grown on a tree and used in pies"
word1 = "apple"
def spellingtest ():
print (definition1)
spellinginput = input ("enter spelling")
if spellinginput == word1
print = ("Well done, you have entered spelling correctly") and score = score+100
編集:実行すると、この行で無効な構文エラーが発生します
if spellinginput == word1