From 28417ef50170aa5696b5903f1289431b381b5c9e Mon Sep 17 00:00:00 2001 From: Christopher Burns Date: Mon, 28 Jun 2010 23:52:44 -0500 Subject: REF: Minor format changes to exercise --HG-- branch : scipy2010 --- day1/exercise/even_perfect_4.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/day1/exercise/even_perfect_4.py b/day1/exercise/even_perfect_4.py index 7910acf..c582a24 100644 --- a/day1/exercise/even_perfect_4.py +++ b/day1/exercise/even_perfect_4.py @@ -5,7 +5,8 @@ def is_perfect_square(n): return i * i == n def all_digits_even(n): - if n < 0: n = -n + if n < 0: + n = -n while n > 0: if n % 2 == 1: return False -- cgit