Zundoko check, ich habe es jetzt nochmal versucht. Ich habe auch einige Arrangements hinzugefügt. Entschuldigung für den redundanten 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()
Klicken Sie hier für die Ausgabeergebnisse
Zunsundokodoko Zunsundokodokodokodoko ┗(^o^)┛wwwww
Dokozunsundokodokozunsundokoki yo shi!
Es wurde flauschig.
Recommended Posts