再次出现一个新的骰子问题,以及python中出现故障的脚本。

编程入门 行业动态 更新时间:2024-10-10 03:30:11
本文介绍了再次出现一个新的骰子问题,以及python中出现故障的脚本。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好,我有一个非常烦人的问题。前几天,我和一位朋友制作了一个创建Dungons and Dragons角色扮演角色的节目,经过大约一天的工作,它正常运作。只有我们发现它并不完全同意游戏规则,而且它有点瑕疵,所以我决定写一个新的。唯一的问题?大多数时候,虽然程序应该输出六个数字,但它只给我2到5之间的任何东西。那个伟大的极客之一是否发现了这个问题呢?请告诉我,这将是一个很大的帮助! :) 所以这里是临时脚本:

Hello, I have a problem that''s hugely annoying. The other day, me and a friend made a program for creating a Dungons and Dragons roleplaying character, and after about a day of work, it was working properly. Only for us to find that it did not fully agree with the rules of the game, and it was slightly flawed, so I decided to write a new one. Only problem? Most of the time, while the program should give an output of six numbers, it only gives me anything between two and five. So does one of the great geek spot the problem? Please tell me, it would be a great help! :) So here''s the temporary script:

展开 | 选择 | 换行 | 行号 推荐答案

删除几行代码后,意识到我不知道你的代码中发生了什么。 我不知道规则那场比赛所以我放弃了。 但是在这段代码中有很多奇怪的事情发生。并且它中还有很多死代码。就我所见,第102行之后没有代码会执行。 但请不要使用空格缩进。使用标签。或至少3+空格,然后我至少使用了find / replace。 After removing several lines of code a realized that i culd not make sense of whats happening in youre code. And i do not know the rules of that game so i gave up. But there is a lot of strange things going on in that pace of code. And there is a lot of dead code in it aswell. No code after line 102 will ever be executet as far as i can see. But please, Dont use space to indent. Use tab. Or atleast 3+ spaces, Then i culd atleast have used find/replace.

删除几行代码后,意识到我已经知道了不知道你的代码中发生了什么。 我不知道那场比赛的规则所以我放弃了。 但是在这段代码中有很多奇怪的事情发生。并且它中还有很多死代码。就我所见,第102行之后没有代码会执行。 但请不要使用空格缩进。使用标签。或者至少3+个空格,然后我至少使用了find / replace。 After removing several lines of code a realized that i culd not make sense of whats happening in youre code. And i do not know the rules of that game so i gave up. But there is a lot of strange things going on in that pace of code. And there is a lot of dead code in it aswell. No code after line 102 will ever be executet as far as i can see. But please, Dont use space to indent. Use tab. Or atleast 3+ spaces, Then i culd atleast have used find/replace.

谢谢你,Smygis,你的意见。但是,标签不是必需的。每个缩进4个空格是大多数Python编辑使用的。

Thank you, Smygis, for your input. However, tabs are not necessary. 4 spaces per indent is what most Python editors use.

我不知道你在尝试用大量的'if'语句做什么。如果我们能够找到您的规则,我们或许可以提出建议。这将打印六个数字: I cannot tell what your are trying to do with the large number of ''if'' statements. If we could find out what your rules are, we might be able to make a suggestion. This will print six numbers: 展开 | 选择 | Wrap | 行号

更多推荐

再次出现一个新的骰子问题,以及python中出现故障的脚本。

本文发布于:2023-10-27 23:54:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1534900.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:骰子   脚本   出现故障   python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!