Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why cannot print "Hello"
#1
Hi,
I am new to python / canopy. by following the tutorial, I key in print "Hello" and it does not return but give error. below is the message:

************************************************************************************
Kernel running in the 'User' environment.

Pylab is active using TkAgg.

Python 3.5.2 |Enthought, Inc. (x86_64)| (default, Mar  2 2017, 16:37:47) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 5.3.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

print "hello"
  File "<ipython-input-1-8d90ecae1fe0>", line 1
    print "hello"
                ^
SyntaxError: Missing parentheses in call to 'print' 
************************************************************************************
can someone help me to get started?
Reply
#2
You're following an old tutorial for python 2. Use print("hello") in python 3.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020