Advertisement
Luc-

python count to one hundred in strings

Apr 17th, 2024
956
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. one_thru_nine = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
  2. for i in one_thru_nine:
  3.     print(i)
  4. print("ten \neleven \ntweleve \nthirteen \nfourteen \nfifteen \nsixteen \nseventeen \neighteen \nnineteen \ntwenty")
  5. for i in one_thru_nine:
  6.     print(f'twenty {i}')
  7. print("thirty")
  8. for i in one_thru_nine:
  9.     print(f'thirty {i}')
  10. print("forty")
  11. for i in one_thru_nine:
  12.     print(f'forty {i}')
  13. print("fifty")
  14. for i in one_thru_nine:
  15.     print(f'fifty {i}')
  16. print("sixty")
  17. for i in one_thru_nine:
  18.     print(f'sixty {i}')
  19. print("seventy")
  20. for i in one_thru_nine:
  21.     print(f'seventy {i}')
  22. print("eighty")
  23. for i in one_thru_nine:
  24.     print(f'eighty {i}')
  25. print("ninety")
  26. for i in one_thru_nine:
  27.     print(f'ninety {i}')
  28. print("one hundred")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement