-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nickname.py
47 lines (25 loc) · 964 Bytes
/
Nickname.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
import names
import random
def name_generator():
return names.get_full_name()
def name_generator_firstname():
return names.get_first_name()
def name_generator_female():
return names.get_full_name(gender='female')
def name_generator_firstname_female():
return names.get_first_name(gender="female")
def name_generator_male():
return names.get_full_name(gender="male")
def name_generator_firstname_male():
return names.get_first_name(gender="male")
def choice_function(number):
if number == 1:
my_funclist = [name_generator, name_generator_firstname]
nickname = random.choice(my_funclist)()
if number == 2:
my_funclist = [name_generator_female, name_generator_firstname_female]
nickname = random.choice(my_funclist)()
if number == 3:
my_funclist = [name_generator_male, name_generator_firstname_male]
nickname = random.choice(my_funclist)()
return nickname