Advertisement
fkudinov

7. Most Wanted Letter / Вирішуємо задачі на Python CheckIO Українською

Dec 7th, 2023
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.70 KB | Source Code | 0 0
  1. def checkio(text: str) -> str:
  2.     return
  3.  
  4.  
  5. if __name__ == '__main__':
  6.     print("Example:")
  7.     print(checkio("Hello World!"))
  8.  
  9.     #These "asserts" using only for self-checking and not necessary for auto-testing
  10.     assert checkio("Hello World!") == "l", "Hello test"
  11.     assert checkio("How do you do?") == "o", "O is most wanted"
  12.     assert checkio("One") == "e", "All letter only once."
  13.     assert checkio("Oops!") == "o", "Don't forget about lower case."
  14.     assert checkio("AAaooo!!!!") == "a", "Only letters."
  15.     assert checkio("abe") == "a", "The First."
  16.     print("Start the long test")
  17.     assert checkio("a" * 9000 + "b" * 1000) == "a", "Long."
  18.     print("The local tests are done.")
Tags: checkio
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement