mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-12-01 00:41:09 +00:00
Correction: File solv01.py
Identifier 'max' changed in 'maxNumber' , since 'max' is a function.
This commit is contained in:
parent
8d9da8f623
commit
01f48e708d
|
@ -17,7 +17,7 @@ def isprime(no):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
max=0
|
maxNumber = 0
|
||||||
n=int(input())
|
n=int(input())
|
||||||
if(isprime(n)):
|
if(isprime(n)):
|
||||||
print n
|
print n
|
||||||
|
@ -31,8 +31,8 @@ else:
|
||||||
for i in range(3,n1,2):
|
for i in range(3,n1,2):
|
||||||
if(n%i==0):
|
if(n%i==0):
|
||||||
if(isprime(n/i)):
|
if(isprime(n/i)):
|
||||||
max=n/i
|
maxNumber = n/i
|
||||||
break
|
break
|
||||||
elif(isprime(i)):
|
elif(isprime(i)):
|
||||||
max=i
|
maxNumber = i
|
||||||
print max
|
print maxNumber
|
||||||
|
|
Loading…
Reference in New Issue
Block a user