二十一点游戏 [英] blackjack game

查看:72
本文介绍了二十一点游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个balckjack代码,似乎没有运行,在python中,它出现了语法错误,我已经尝试对其进行排序。似乎不起作用。下面是我的代码,如果有人可以解决它的错误。那挺棒的。有一个附加文件,看看代码更清洁。

i have a balckjack code, which does not seem to run, in python, it comes up with syntax error, i have try sortng it out. does not seem to work. below is my code, if anyone can work out wht wrong with it. that will be great. thereis an attched file, to see the code more cleaer.

展开 | 选择 < span class =codeDivider> | Wrap | 行号

推荐答案

你的缩进都搞砸了。你在循环之外休息一下。此语句无效Python:
Your indentation is all messed up. You have a break outside of a loop. This statement is invalid Python:
展开 | 选择 | Wrap | 行号


好了解,我将如何理清,else tp == 21"因为我似乎不明白问题是什么。以及如何解决它。
ok understand, how would i sort out, the "else tp ==21" cause i dont seem to understand wht the problem is. and how i solve it.


使用elif:
Use elif:
展开 | 选择 | Wrap | 行号


这篇关于二十一点游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆