Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

euler16 made pythonic and conforms to pep8 and pyflakes

  • Loading branch information...
commit d0421bb28f3aeac3a6c8f0dfbd891763bf7f5983 1 parent 15d94e6
Akshar Raaj authored

Showing 1 changed file with 3 additions and 9 deletions. Show diff stats Hide diff stats

  1. +3 9 euler16.py
12 euler16.py
... ... @@ -1,9 +1,3 @@
1   -thousand_power_of_two=2**1000
2   -print thousand_power_of_two
3   -thousand_power_of_two=str(thousand_power_of_two)
4   -required_sum=0
5   -for each in thousand_power_of_two:
6   - required_sum+=int(each)
7   -print "Sum of the digits of the number 2 power 1000 is "+str(required_sum)
8   -
9   -
  1 +thousand_power_of_two = 2 ** 1000
  2 +sum_of_digits = sum([int(each) for each in str(thousand_power_of_two)])
  3 +print "Sum of the digits of the required number", sum_of_digits

0 comments on commit d0421bb

Please sign in to comment.
Something went wrong with that request. Please try again.