- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransformThreeWords.py
More file actions
Latest commit
28 lines (16 loc) · 622 Bytes
/
Copy pathtransformThreeWords.py
File metadata and controls
28 lines (16 loc) · 622 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
importsys
deffirstWord(first: str) ->str:
convertedFirst=''
forchinfirst:
convertedFirst+='$'ifchin'AEIOU'elsech
returnconvertedFirst
defsecondWord(second: str) ->str:
convertedSecond=''
forchinsecond:
convertedSecond+='#'ifchin'BCDFGHJKLMNPQRSTVWXYZ'elsech
returnconvertedSecond
defthirdWord(third: str) ->str:
returnthird.upper()
defstringTransformation(array):
returnfirstWord(array[0])+secondWord(array[1])+thirdWord(array[2])
print(stringTransformation(['priyansi', 'himan*si', 'kiSHORW']))