-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaiku.py
executable file
·32 lines (26 loc) · 1.39 KB
/
haiku.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python3
"""
generates a kind of haiku (usually 5-7-5 "syllables")
**TODO**
* https://en.wikipedia.org/wiki/Haiku
* https://www.101computing.net/haiku-generator-in-python/
"""
from random import randint
wordList1 = ["Amazing", "Breathtaking", "Enchanting", "Colourful", "Delightful", "Delicate", "Inspiring"]
wordList2 = ["visions", "distance", "conscience", "process", "chaos", "brothers", "fathers", "mothers", "siblings", "sisters", "nowhere", "wormhole"]
wordList3 = ["superstitious", "contrasting", "graceful", "inviting", "contradicting", "overwhelming"]
wordList4 = ["true", "dark", "cold", "warm", "great", "mercy"]
wordList5 = ["scenery","season", "colours","lights","Spring","Winter","Summer","Autumn"]
wordList6 = ["undeniable", "beautiful", "irreplaceable", "unbelievable", "irrevocable"]
wordList7 = ["inspiration", "imagination", "wisdom", "thoughts"]
wordIndex1=randint(0, len(wordList1)-1)
wordIndex2=randint(0, len(wordList2)-1)
wordIndex3=randint(0, len(wordList3)-1)
wordIndex4=randint(0, len(wordList4)-1)
wordIndex5=randint(0, len(wordList5)-1)
wordIndex6=randint(0, len(wordList6)-1)
wordIndex7=randint(0, len(wordList7)-1)
haiku = wordList1[wordIndex1] + " " + wordList2[wordIndex2] + ",\n"
haiku = haiku + wordList3[wordIndex3] + " " + wordList4[wordIndex4] + " " + wordList5[wordIndex5] + ",\n"
haiku = haiku + wordList6[wordIndex6] + " " + wordList7[wordIndex7] + "."
print(haiku)