Advertisement
biswasrohit20

g

Mar 16th, 2021
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. def numberToText(n):
  2. if n == 1:
  3. return "one"
  4. elif n == 2:
  5. return "two"
  6. elif n == 3:
  7. return "three"
  8. elif n == 4:
  9. return "four"
  10. elif n == 5:
  11. return "five"
  12. elif n == 6:
  13. return "six"
  14. elif n == 7:
  15. return "seven"
  16. elif n == 8:
  17. return "eight"
  18. elif n == 9:
  19. return "nine"
  20. elif n == 10:
  21. return "ten"
  22.  
  23.  
  24. def count(a,b):
  25. for i in range(a,b+1):
  26. print(numberToText(i))
  27.  
  28. count(5,10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement