Created
August 6, 2017 07:08
-
-
Save jaamo/369462fda3cfd2201ece491183521989 to your computer and use it in GitHub Desktop.
Revisions
-
jaamo created this gist
Aug 6, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ from random import randint firstNames = ['Kalle', 'Lahna', 'Irma', 'Pekka', 'Jouko', 'Antti', 'Jaakko', 'Jalmari', 'Vihtori', 'Albert', 'Gandalf', 'Iron', 'Batman', 'Sandman'] lastNamesPart1 = ['Virta', 'Kahvi', 'Kala', 'Järvi', 'Niemi', 'Banaani', 'Laku', 'Kilpi', 'Sammakko', 'Pieru', 'Kakka', 'Lehmä', 'Räkä', 'Lima', 'Klöntti', 'Lanta', 'Lemu', 'Löyhkä', 'Yrjö', 'Vaippa', 'Sipuli', 'Kalja', 'Öljy'] lastNamesPart2 = ['nen', 'joki', 'kulma', 'järvi', 'kylä', 'kuisma', 'salo', 'lahti', 'tunkio', 'kasa', 'läjä', 'hiki', 'korva', 'nöyhtä', 'huuli'] def pickWord(words): return words[randint(0, len(words) - 1)] def generateName(): firstName = pickWord(firstNames); if randint(0, 1) == 0: firstName += '-' + pickWord(firstNames) return firstName + ' ' + pickWord(lastNamesPart1) + pickWord(lastNamesPart2) while True: print(generateName()) input()