Advertisement
fkudinov

3. Sum Numbers / Вирішуємо задачі на Python CheckIO Українською

Dec 6th, 2023
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | Source Code | 0 0
  1. def sum_numbers(text: str) -> int:
  2.     return 0
  3.  
  4.  
  5. if __name__ == '__main__':
  6.     print("Example:")
  7.     print(sum_numbers('hi'))
  8.  
  9.     # These "asserts" are used for self-checking and not for an auto-testing
  10.     assert sum_numbers('hi') == 0
  11.     assert sum_numbers('who is 1st here') == 0
  12.     assert sum_numbers('my numbers is 2') == 2
  13.     assert sum_numbers('This picture is an oil on canvas '
  14.  'painting by Danish artist Anna '
  15.  'Petersen between 1845 and 1910 year') == 3755
  16.     assert sum_numbers('5 plus 6 is') == 11
  17.     assert sum_numbers('') == 0
  18.     print("Coding complete? Click 'Check' to earn cool rewards!")
Tags: checkio
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement