0

我不断收到此错误

Welcome to Tic Tac Toe
Do you want to be X or O?
Traceback (most recent call last):
  File "C:\Python27\last try.py", line 145, in <module>
    playerLetter, computerLetter = inputPlayerLetter()
  File "C:\Python27\last try.py", line 27, in inputPlayerLetter
    letter = input().upper()
EOFError: EOF when reading a line
Finished in 0.2s with exit code 1

当我将代码放入 python tic tac toe 游戏时。有人可以帮忙吗?!

井字游戏的代码来自http://inventwithpython.com/tictactoe.py

注意:我尝试安装和配置 sublimerepl 并没有解决问题。

4

1 回答 1

1

您需要在终端中运行代码,因为该input()函数要求您输入一些文本。

Sublime 环境是不够的。

于 2013-02-05T23:51:53.813 回答