From c0af07b3f019ab5daf5f594f86f41c3dcd092883 Mon Sep 17 00:00:00 2001 From: yashnator <252yash@gmail.com> Date: Mon, 7 Feb 2022 20:17:10 +0530 Subject: [PATCH] Code added --- tests/yashnator_test.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/yashnator_test.py diff --git a/tests/yashnator_test.py b/tests/yashnator_test.py new file mode 100644 index 0000000..e4425d3 --- /dev/null +++ b/tests/yashnator_test.py @@ -0,0 +1,13 @@ +def factorial(n): + count = 0 + pd = 1 + while(True): + if(count==n): + break + else: + count+=1 + pd*= count + return pd + +def test_factorial(): + assert factorial(5) == 120 \ No newline at end of file