- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathNumToEnglish.py
More file actions
Latest commit
28 lines (28 loc) · 542 Bytes
/
Copy pathNumToEnglish.py
File metadata and controls
28 lines (28 loc) · 542 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
'''
given the number, print the english for the number.
for example, 1023 is one thousand and twenty three
'''
defNumtoEnglish(num):
word1= {
1: 'one',
2: 'two',
3: 'three',
4: 'four',
5: 'five',
6: 'six',
7: 'seven',
8: 'eight',
9: 'nine',
}
word11= {
10: 'ten',
11: 'eleven',
12: 'twelve',
13: 'thirteen',
14: 'fourteen',
15: 'fifteen',
16: 'sixteen',
17: 'seventeen',
18: 'eighteen',
19: 'nineteen'
}