[PYTHON] Zundoko check, will Kiyoshi come out? Will ┗ (^ o ^) ┛ come out?

I'm free

Zundoko check, I tried it again now. I also added some arrangements. Sorry for the verbose code ...

zundoko.py


import random

def main():
    zundoko = ['Dung', 'Doco']
    count_zun = 0
    count_doko = 0
    while True:
        tmp = zundoko[random.randint(0, 1)]
        print(tmp, end="")
        if tmp == 'Dung':
            count_zun += 1
            count_doko = 0
        else:
            if count_zun == 4:
                print('Ki yo shi!')
                break
            elif count_doko == 3:
                print('┗(^o^)┛wwwww')
                break
            count_zun = 0
            count_doko += 1

if __name__ == '__main__':
    main()

Click here for output results

Zunsundokodoko Zunsundokodokodokodoko ┗(^o^)┛wwwww
Dokozunsundokodokozunzundokoki yo shi!

It became fluffy.

Recommended Posts

Zundoko check, will Kiyoshi come out? Will ┗ (^ o ^) ┛ come out?