Type/to search
2
Follow
0
Followers
Comment sélectionner aléatoirement long ou court en utilisant Python ?
Help
Created 2021-07-23 23:58:32  Updated 2021-07-24 00:10:58
 2
 1422

Merci de nous aider.

Comment sélectionner aléatoirement long ou court en utilisant Python ?

Je veux choisir un if au hasard pour faire le cycle, par exemple choisir un duo au hasard, puis entrer dans un if, et ensuite choisir DUO ou Kong à nouveau.

C'est en python
def main:

True false attribué au hasard à Duo ou Kong

while True: if Duo: ...... if Kong: ......
Related Recommendations
Comment
All comments (2)

    撞大运策略吗?

    5 years ago

    主循环里每次开始生成一个随机数,然后根据随机数去决定对应操作。

    5 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)