Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print function was not work without parenthesis in python3 #5

Open
cherukurir opened this issue Mar 29, 2017 · 1 comment
Open

print function was not work without parenthesis in python3 #5

cherukurir opened this issue Mar 29, 2017 · 1 comment

Comments

@cherukurir
Copy link

print ("Starting gradient descent at b = {0}, m = {1}, error = {2}".format(initial_b, initial_m, compute_error_for_line_given_points(initial_b, initial_m, points)))

print ("Running...")

print ("After {0} iterations b = {1}, m = {2}, error = {3}".format(num_iterations, b, m, compute_error_for_line_given_points(b, m, points)))
@CDHales
Copy link

CDHales commented Aug 7, 2017

It's a difference between Python 2 and Python 3. In Python 3 print is a function. With Python 2 that code would work fine. I'm not sure why he states that this code should work with both versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants