added many files

This commit is contained in:
ada-dmitry
2024-02-29 15:12:40 +03:00
parent 5a686b0f92
commit 09c84971a9
11 changed files with 101 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
import unittest
def fact(x):
if(x==1):
return 1
else:
return x*fact(x-1)
class FactTest(unittest.TestCase):
'''Проверка функции факториала'''
def test_5_fact(self):
ans = fact(5)
self.assertEqual(ans, 120)
unittest.main()