-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathname_generator_two.py
37 lines (29 loc) · 1.58 KB
/
name_generator_two.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
33
34
35
36
# Author: H J Poe
# This program will generate a name using syllables.
import random
consonant_start_syllables = ["tor", "lyn", "belle", "can", "con", "dor", "ric",
"ton", "cal", "nia", "for", "ron", "rot", "ram",
"ham", "har", "not", "fil", "fol", "nor", "rom",
"roc", "cor", "court", "line", "lore", "lam", "lab",
"car", "cad", "dale", "dock", "rock", "rook", "mock",
"lock", "lack", "loch", "doom", "dig", "notch", "lan"]
vowel_start_syllables = ["ette", "arc", "anne", "elle", "ine", "ella", "irc", "ash",
"ate", "end", "ear", "ebb", "art", "arb", "arm", "all", "ell",
"inn", "inc", "ice", "ico", "ica", "ide", "ido", "ida", "ill",
"if", "ike", "iko", "ick", "ile", "ila", "ild", "ilm", "iln",
"ilo", "ima", "im", "imo", "otto", "ock", "on", "old", "ole",
"alm", "elm", "olm", "eck", "ode", "ade", "ale", "aim", "air"]
switch_choice = {
1: consonant_start_syllables,
2: vowel_start_syllables
}
# Number of syllables
name_len = random.randint(2, 6)
print("Name size: ", name_len)
for x in range(0, name_len):
random_choice = random.randint(1, 2)
rand_syllable_choice = random.randint(1, (len(switch_choice[random_choice]) - 1))
if random_choice == 1:
print(consonant_start_syllables[rand_syllable_choice], end="")
elif random_choice == 2:
print(vowel_start_syllables[rand_syllable_choice], end="")