0
私は次のエラーを見ています:「非ASCII文字」エラーPythonプログラムを実行しているWindows PowerShellのから
SyntaxError: Non-ASCII character '\x93' in file new2.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
私はこのコードを実行すると:
print(“Welcome")
guess = 0
while guess != 5:
g = input(“Guess the number: ")
guess = int(g)
if guess == 5:
print(“You win!")
else:
if guess > 5:
print(“Too high")
else:
print(“Too low")
print(“Game over!")
'' 'とは何シンボルですか? '' print'文の中で同じ '' g = input( "Guess the number:") 'の行にあります。 – UnholySheep
あなたの引用符は正しいですが、あなたの開始引用符は両方とも*であり、ASCIIではない*引用符*です。他のアプリケーションからコピー&ペーストしましたが、それはあなたのエラーの原因かもしれません。 –