Skip to content

Instantly share code, notes, and snippets.

View mdamircoder's full-sized avatar
💭
Open to work

Md Amir Sohail mdamircoder

💭
Open to work
View GitHub Profile
@mdamircoder
mdamircoder / Largest-Prime-Divisor.py
Last active February 3, 2018 10:38
Find Largest / Maximum Prime Divisor in Python
def Max_Prime_Divisor(n):
PrDiv = -1
if n == 1 : return "N.A." # 1 is handled separately
# All primes are odd numbers except 2
# We will first check for 2
# Then for other odd numbers starting from 3, same procedure