Skip to content

Instantly share code, notes, and snippets.

@emergent

emergent/zundoko03.py

Last active Oct 22, 2017
Embed
What would you like to do?
import random
ZUN = "zun"
DOKO = "doko"
KIYOSHI = "kiyoshi!"
ZUNDOKO = [0,0,0,0,1]
MAXLEN = len(ZUNDOKO)
def zundoko():
words = []
counter = 0
while (words != ZUNDOKO):
counter += 1
word = random.randint(0,1)
print(ZUN if word == 0 else DOKO)
words.append(word)
if len(words) > MAXLEN:
words.pop(0)
print(KIYOSHI)
print(counter)
if __name__ == '__main__':
zundoko()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.