####Does my number look big in this? (6 kyu) |||
- Module: narcissistic.py
- Tests: test_narcissistic.py
- Link: https://www.codewars.com/kata/5287e858c6b5a9678200083c
-
Interesting solution by pavel.koshev:
def narcissistic(value): return bool(value==sum([int(a) ** len(str(value)) for a in str(value)]))
-
####Sum of Digits / Digital Root (6 kyu) |||
- Module: digital_root.py
- Tests: test_digital_root.py
- Link: https://www.codewars.com/kata/541c8630095125aba6000c00
-
Interesting solution by bartholomisha:
def digital_root(n): return n%9 or n and 9
-
- Module: jaden_casing.py
- Tests: test_jaden_casing.py
- Link: https://www.codewars.com/kata/5390bac347d09b7da40006f6
- Module: validate_pin.py
- Tests: test_validate_pin.py
- Link: https://www.codewars.com/kata/55f8a9c06c018a0d6e000132
-
Interesting Solution by CrazyMerlyn, pivek303, lechevalier, aytrack, bugaevc, andriis (plus 18 more warriors):
def validate_pin(pin): return len(pin) in (4, 6) and pin.isdigit()
-
- Module: highest_and_lowest.py
- Tests: test_highest_and_lowest.py
- Link: https://www.codewars.com/kata/554b4ac871d6813a03000035
-
Interesting Solution by Deantwo:
def high_and_low(numbers): #z. nn = [int(s) for s in numbers.split(" ")] return "%i %i" % (max(nn),min(nn))
-
- Module: get_middle.py
- Tests: test_get_middle.py
- Link: https://www.codewars.com/kata/56747fd5cb988479af000028
- Module: find_smallest_int.py
- Tests: test_find_smallest_int.py
- Link: https://www.codewars.com/kata/55a2d7ebe362935a210000b2
- Module: multiply.py
- Tests: test_multiply.py
- Link: https://www.codewars.com/kata/50654ddff44f800200000004
- Interesting solution by jihygk:
multiply = __import__('operator').mul
- Interesting solution by jihygk: