Skip to content

Commit 7ee262e

Browse files
Merge branch 'master' into master
2 parents a4cd897 + 3899f9b commit 7ee262e

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

Maths/SimpsonRule.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"Simpson Rule"
99
1010
'''
11+
from __future__ import print_function
12+
1113

1214
def method_2(boundary, steps):
1315
# "Simpson Rule"
@@ -41,7 +43,7 @@ def main():
4143
steps = 10.0 #define number of steps or resolution
4244
boundary = [a, b] #define boundary of integration
4345
y = method_2(boundary, steps)
44-
print 'y = {0}'.format(y)
46+
print('y = {0}'.format(y))
4547

4648
if __name__ == '__main__':
4749
main()

Maths/TrapezoidalRule.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"extended trapezoidal rule"
88
99
'''
10+
from __future__ import print_function
1011

1112
def method_1(boundary, steps):
1213
# "extended trapezoidal rule"
@@ -39,7 +40,7 @@ def main():
3940
steps = 10.0 #define number of steps or resolution
4041
boundary = [a, b] #define boundary of integration
4142
y = method_1(boundary, steps)
42-
print 'y = {0}'.format(y)
43+
print('y = {0}'.format(y))
4344

4445
if __name__ == '__main__':
4546
main()

Project Euler/Problem 10/sol1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ def sum_of_primes(n):
3535
n = int(sys.argv[1])
3636
print(sum_of_primes(n))
3737
except ValueError:
38-
print('Invalid entry - please enter a number.')
38+
print('Invalid entry - please enter a number.')

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ __Properties__
8383

8484
###### View the algorithm in [action][shell-toptal]
8585

86-
### Time-Compexity Graphs
86+
### Time-Complexity Graphs
8787

8888
Comparing the complexity of sorting algorithms (Bubble Sort, Insertion Sort, Selection Sort)
8989

dynamic_programming/matrix_chain_order.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import print_function
2+
13
import sys
24
'''
35
Dynamic Programming

0 commit comments

Comments
 (0)