皆さん、私はPythonに関してはnoobのabitですが、私はクラスで開始したグレードコンバータに未完成のマークを付けて遊んでいました。すべてがうまく動作するまで '二番目の==はい:'それは未定義ではいと言うところ。どのように私はこれを解決するのですか?!?!?!繰り返しますが、私はnoobです。私はこのウェブサイトが答えを得るのに最も簡単な場所になると思っていました(学校は別として、私はcbaです)。助けてくれてありがとう!自己作成の変数がPythonで動作しない
print("-------WELCOME-------")
testscore = int(input("What mark did you get?"))
if testscore> 75:
print("You got an A!")
else:
if testscore< 30:
print("You got an F")
second = input("do you want to get another test score?")
if second == yes:
if testscore> 75:
print("You got an A!")
else:
if testscore< 30:
print("You got an F")
if second == no:
print("Thanks for using MARK TO GRADE CONVERTER. See you soon!")
'第2の場合==" yes ":' ...変数ではなく文字列 "yes"と比較します。 –
'もし二番目== 'はい':' – Riccati