Advertisement
biswasrohit20

count

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