More example

This commit is contained in:
Artur Savitskiy 2023-07-18 20:00:14 +02:00
parent 2161437e1b
commit dd493e1481
1 changed files with 22 additions and 0 deletions

22
HNS/main.py Normal file
View File

@ -0,0 +1,22 @@
def my_sum(a, b):
return a + b
test_cases = [
("Sobaka", 3, my_sum(1, 2)),
("Koshka", 5, my_sum(2, 3)),
("Ezhik", 3, my_sum(2, 1))
]
def print_zhivotny(mnogo_zhivotny):
for zhivotny in mnogo_zhivotny:
test_name = zhivotny[0]
test_actual = zhivotny[1]
test_expected = zhivotny[2]
print(test_name, test_actual, test_expected)
print("-" * 20)
print_zhivotny(test_cases)