-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathwelcome.py
More file actions
31 lines (28 loc) · 801 Bytes
/
Copy pathwelcome.py
File metadata and controls
31 lines (28 loc) · 801 Bytes
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
# https://www.codewars.com/kata/welcome/train/python
def greet(language):
dic = {'english': 'Welcome',
'czech': 'Vitejte',
'danish': 'Velkomst',
'dutch': 'Welkom',
'estonian': 'Tere tulemast',
'finnish': 'Tervetuloa',
'flemish': 'Welgekomen',
'french': 'Bienvenue',
'german': 'Willkommen',
'irish': 'Failte',
'italian': 'Benvenuto',
'latvian': 'Gaidits',
'lithuanian': 'Laukiamas',
'polish': 'Witamy',
'spanish': 'Bienvenido',
'swedish': 'Valkommen',
'welsh': 'Croeso'}
if language in dic:
return dic[language]
else:
return 'Welcome'
print greet('english')#, 'Welcome')
print greet('dutch')#, 'Welkom')
print greet('IP_ADDRESS_INVALID')#, 'Welcome')
print greet('')#, 'Welcome')
print greet(2)#, 'Welcome')