Commit Graph

4 Commits

Author SHA1 Message Date
Daniel Ingram
7ee262e514
Merge branch 'master' into master 2018-03-19 10:11:24 -04:00
Daniel Ingram
c6c5d62311 Fixed xrange compatibility for Python 3 2018-03-19 09:29:46 -04:00
cclauss
705f43ad5b
xrange() was removed in Python 3 in favor of range()
@daniel-s-ingram Similar changes needed on Problems 25 and 28 so they can run on Python 3.

flake8 testing of https://github.com/TheAlgorithms/Python on Python 3.6.3

$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./Project Euler/Problem 10/sol1.py:5:11: F821 undefined name 'xrange'
	for i in xrange(2, int(sqrt(n))+1):
          ^
./Project Euler/Problem 10/sol1.py:17:11: F821 undefined name 'xrange'
	for i in xrange(3, n, 2):
          ^
./Project Euler/Problem 25/sol1.py:10:12: F821 undefined name 'xrange'
		for i in xrange(2, n+1):
           ^
./Project Euler/Problem 28/sol1.py:7:11: F821 undefined name 'xrange'
	for i in xrange(1, int(ceil(n/2.0))):
          ^
4     F821 undefined name 'xrange'
```
2018-03-19 03:18:18 +01:00
Daniel Ingram
7beaeae014 Brute force solution to Problem 10 2018-03-14 14:35:16 -04:00