mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
from __future__ import print_function For Python 3
@ltdouthit __print()__ is a function in Python 3
This commit is contained in:
parent
6035672096
commit
0516bde45f
@ -7,6 +7,7 @@ method 1:
|
||||
"extended trapezoidal rule"
|
||||
|
||||
'''
|
||||
from __future__ import print_function
|
||||
|
||||
def method_1(boundary, steps):
|
||||
# "extended trapezoidal rule"
|
||||
@ -39,7 +40,7 @@ def main():
|
||||
steps = 10.0 #define number of steps or resolution
|
||||
boundary = [a, b] #define boundary of integration
|
||||
y = method_1(boundary, steps)
|
||||
print 'y = {0}'.format(y)
|
||||
print('y = {0}'.format(y))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user