Showing eroor in testcase 4 & 5

BOSTON NUMBERS
my code is showing error in testcase 4 and 5

Hi @Piyush-Pandey-2580479718941914, for case like 11 or any number for which the prime factors are greater than your code fails and gives 0 as output in the Question it said the sum of digits of the given number is Equals to the sum of digits of its prime numbers is equal only when the number is Boston number.
For e.g…, n = 22
Prime Factors = 2 x 11
Sum of Digits = 2 + 2 = 4
Sum of Digits of Factors = 2 + (1 + 1) -> 4
Hence it is a Boston number.