Python中文
首页
教程
问答
标签
搜索
登录
注册
python3.3.5中的tic-tac-toe赋值
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我几乎完成了一个井字游戏的任务,但就我的一生而言,我无法解决在执行时遇到的错误。任何建议都将不胜感激。在</p> <p>代码链接:<a href="http://pastebin.com/k7deVCAD" rel="nofollow">http://pastebin.com/k7deVCAD</a></p> <p>执行时出错:</p> <p>回溯(最近一次呼叫): 文件“C:/Users/Andrew/Dropbox/program2.1.py”,第168行,in 我希望这个能起作用()</p> <p>文件“C:/Users/Andrew/Dropbox/program2.1.py”,第145行,在“我希望”这一行有效 播放(玩家姓名,玩家标记)</p> <p>文件“C:/Users/Andrew/Dropbox/program2.1.py”,第154行,正在播放 askUserToPlayNextMove(player_names['X',player_marks)#要求他们输入移动 文件“C:/Users/Andrew/Dropbox/program2.1.py”,第52行,askUserToPlayNextMove (row,column)=input(“请按行,列格式输入下一步移动”)</p> <p>值错误:太多的值无法解包(应为2)</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>功能</p> <pre><code>askUserToPlayNextMove (currentPlayer, player_marks) </code></pre> <p>需要两个参数,但您将它们作为单个元组传递:</p> ^{pr2}$ <p>试试这个:</p> <pre><code>askUserToPlayNextMove (player_names['X'], player_marks) </code></pre>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何在乒乓球比赛中预测球的轨迹,对于AI球拍预测?
2 回答
如何在乒乓球游戏中阻止球
4 回答
如何在乘法和模中不乘空间?
4 回答
如何在乘法和除以2个不同的数字之间进行交换?
5 回答
如何在也是数据一部分的单个字符上拆分大字符串
2 回答
如何在乾草堆中找到針,有更好的解決方案嗎?
4 回答
如何在事件wxWidgets中传递自定义数据
10 回答
如何在事件中使用lambda i=i?
6 回答
如何在事件中心只接收最近的数据
1 回答
如何在事件发生之前保持云函数运行?
3 回答
如何在事件发生后使页面重定向到同一页面
9 回答
如何在事件回调之间保持python生成器的状态
8 回答
如何在事件处理程序(pythonsocket、sphinx)中保留docstring
3 回答
如何在事件处理程序中更改wxRichTextCtrl的光标位置?
1 回答
如何在事件处理程序中访问外部对象?
8 回答
如何在事件循环中将协程打包为正常函数?
6 回答
如何在事件循环之外运行协同程序?
6 回答
如何在事件循环结束时为并发未来的所有线程调用类方法?
3 回答
如何在事件文件中只保留一份摘要?
9 回答
如何在事件模板中添加事件
5 回答