id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

NumInWords


Create the function NumInWords(n) which will be given a number in the range 0 <= n < 1000, and will return a string with the number stated in English words. Try to make your code as short as you can.


NumInWords(0) → 'zero'
NumInWords(39) → 'thirty-nine'
NumInWords(101) → 'one hundred and one'

...Save, Compile, Run (ctrl-enter)

def NumInWords(n):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Post-solution available

Copyright Nick Parlante 2017 - privacy