- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTelePhoneWords.py
More file actions
Latest commit
33 lines (30 loc) · 628 Bytes
/
Copy pathTelePhoneWords.py
File metadata and controls
33 lines (30 loc) · 628 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
32
33
'''write a routine that takes a seven digit telephone number
to print out all possible combinations of the letters or words
that represent thte given number
abc def
1 2 3
ghi jkl mno
4 5 6
prs tuv wxy
7 8 9
* 0 #
'''
digitLetters= {
2:['a','b','c'],
3:['d','e','f'],
4:['g','h','i'],
5:['j','k','l'],
6:['m','n','o'],
7:['p','r','s'],
8:['t','u','v'],
9:['w','x','y'],
}
defnumber_to_words(number):
'''
print out all the possible letters or words that represent the given number
Args:
string: 3-3-4 integer string
'''
pass
defwords_to_number(word):
pass