-
Notifications
You must be signed in to change notification settings - Fork 0
/
baby name generator.py
89 lines (54 loc) · 2.29 KB
/
baby name generator.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import random, string
letter_input_1 = input('Choose a letter.."v" for vowels, "c" for consonants, "l" for any other letter)
letter_input_2 = input('Choose a letter.."v" for vowels, "c" for consonants, "l" for any other letter)
letter_input_3 = input('Choose a letter.."v" for vowels, "c" for consonants, "l" for any other letter)
letter_input_4 = input('Choose a letter.."v" for vowels, "c" for consonants, "l" for any other letter)
letter_input_5 = input('Choose a letter.."v" for vowels, "c" for consonants, "l" for any other letter)
vowels = 'aeiou'
consonants = 'bcdfghjklmnpqrstvwxyz'
letter = string.ascii_lowercase
def generator():
if letter_input_1 == "v":
letter1 = random.choice(vowels)
elif letter_input_1 == "c":
letter1 = random.choice(consonants)
elif letter_input_1 == "l":
letter1 = random.choice(letter)
else:
letter1 = letter_input_1
if letter_input_2 == "v":
letter2 = random.choice(vowels)
elif letter_input_2 == "c":
letter2 = random.choice(consonants)
elif letter_input_2 == "l":
letter2 = random.choice(letter)
else:
letter2 = letter_input_2
if letter_input_3 == "v":
letter3 = random.choice(vowels)
elif letter_input_3 == "c":
letter3 = random.choice(consonants)
elif letter_input_3 == "l":
letter3 = random.choice(letter)
else:
letter3 = letter_input_3
if letter_input_4 == "v":
letter4 = random.choice(vowels)
elif letter_input_4 == "c":
letter4 = random.choice(consonants)
elif letter_input_4 == "l":
lette4 = random.choice(letter)
else:
letter4 = letter_input_4
if letter_input_5 == "v":
letter5 = random.choice(vowels)
elif letter_input_5 == "c":
letter5 = random.choice(consonants)
elif letter_input_5 == "l":
letter5 = random.choice(letter)
else:
letter5 = letter_input_5
name = letter1 + letter2 + letter3 + letter4 + letter5
return (name)
for i in range(20):
print(generator())