class Softhunt:
def FindFact(self, n):
for i in range(1, n+1):
if n % i == 0:
print(i, end=" ")
print("Enter a Number: ", end="")
try:
num = int(input())
print("
Factors of " +str(num)+ " are: ", end="")
ob = Softhunt()
ob.FindFact(num)
print()
except ValueError:
print("
Invalid Input!")
class Softhunt:
def FindFact(self, n):
for i in range(1, n+1):
if n % i == 0:
print(i, end=" ")
print("Enter a Number: ", end="")
try:
num = int(input())
print("
Factors of " +str(num)+ " are: ", end="")
ob = Softhunt()
ob.FindFact(num)
print()
except ValueError:
print("
Invalid Input!")