79453555

Date: 2025-02-20 06:56:00
Score: 1
Natty:
Report link

This response could be considered as a variation of the response of @Selcuk

n = int( input( "Enter an integer: " ))

def getSecondLargestDivisor( num ):
    findSecond = False
    for i in range( 2, num ):
        if num % i == 0:
            if not findSecond:
                findSecond = True
            else:
                return num / i
    return 1
        
print( getSecondLargestDivisor( n ) )
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Selcuk
  • Low reputation (0.5):
Posted by: Marce Puente