Type/to search
2
Follow
0
Followers
¿Cómo seleccionar aleatoriamente largo o corto usando Python?
Help
Created 2021-07-23 23:58:32  Updated 2021-07-24 00:10:58
 2
 1422

Gracias por enseñarnos.

¿Cómo seleccionar aleatoriamente largo o corto usando Python?

Por ejemplo, quiero elegir al azar un if para hacer un ciclo, como elegir al azar a Duo, entrar en el interior de if para hacerlo, y al final, elegir nuevamente a DUO o Kong.

Es en Python.
def main:

Caso de verdadero falso asignado a Duo o 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)