Start with Python

This commit is contained in:
Kenneth Mendonca
2015-07-22 16:44:07 -04:00
parent 94031a251f
commit 57cb3981a0
100 changed files with 2085 additions and 0 deletions

View File

@ -0,0 +1,10 @@
Largest Prime Factor
====================
Write a function that takes a number as input, and returns the largest prime factor of a given number. If the number is prime itself, then it's largest prime factor is itself.
```
largest_prime(15) # 5
largest_prime(18) # 3
largest_prime(19) # 19
largest_prime(302) # 151
```

View File

@ -0,0 +1 @@
def largest_prime(number):