From 8c7bc52d9afea2a1b97647aababa2b147a70f317 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Wed, 19 Oct 2022 19:56:57 +0300 Subject: [PATCH] Fix error in prime_factors: - Used number instead of num when the remaining value is a factor Signed-off-by: HeshamTB --- rsa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsa.py b/rsa.py index 3f07577..e1c0692 100644 --- a/rsa.py +++ b/rsa.py @@ -289,7 +289,7 @@ def prime_factors(number, base): if j != 0: factors.update({i: j}) if num > 2: - factors.update({number: 1}) + factors.update({int(num): 1}) print(factors) def readKeyFile(keyName):