Error while printing hello world in python.

+2 votes

I am unable to print hello world in python. It gives me the below error:

print "Hello World!"

                  ^

SyntaxError: Missing parentheses in call to 'print' 
Mar 31, 2018 in Python by Perry
• 17,010 points
80 views

2 answers to this question.

+2 votes
Best answer

You must be trying this command in Python3. Instead of adding space, add paranthesis. As print is considered as a function now. 

print("Hello World!")
answered Mar 31, 2018 by GandalfDwhite
• 1,320 points

selected Oct 12, 2018 by Omkar
0 votes
print("Hello, World!")

You are probably using Python 3.0, where print is now a function (hence the parenthesis) instead of a statement.

answered Oct 12, 2018 by findingbugs
• 4,750 points

Related Questions In Python

0 votes
1 answer

Why am I getting a error when I am printing two different data types in python?

different data type is being used. that ...READ MORE

answered Mar 6 in Python by Mohammad
• 3,060 points
34 views
0 votes
1 answer

How to resolve the error while importing cv2 from openCV in python?

I would recommend you go with anaconda ...READ MORE

answered Jul 31 in Python by Mohammad
• 3,060 points
26 views
0 votes
1 answer

Do-while loop in Python

Python does not have a do-while construct.  If ...READ MORE

answered May 11, 2018 in Python by Hamartia's Mask
• 1,580 points
97 views
0 votes
2 answers

Indentation Error in Python

Use tabs instead of spaces. This is ...READ MORE

answered Feb 14 in Python by Shashank
• 1,350 points
71 views
0 votes
1 answer

Why there is no do while loop in python

There is no do...while loop because there ...READ MORE

answered Aug 6, 2018 in Python by Priyaj
• 56,520 points
99 views
+1 vote
1 answer

How to print an error in Python?

For Python 2.6 and later and Python ...READ MORE

answered Aug 23, 2018 in Python by Priyaj
• 56,520 points
142 views
0 votes
1 answer

Key error in Python

A KeyError occurs when the Key doesn't ...READ MORE

answered Sep 20, 2018 in Python by SDeb
• 13,160 points
426 views
0 votes
1 answer

How can I print an Error in Python?

For Python 2.6 and later and Python ...READ MORE

answered Oct 12, 2018 in Python by ariaholic
• 7,340 points
32 views
0 votes
1 answer

Real-world examples of applications in python?

You can view this reference here: Python projects ...READ MORE

answered Nov 2, 2018 in Python by Nabarupa
21 views
0 votes
1 answer

How to fix this? ValueError: invalid literal for int() with base 10 error in Python

The following are totally acceptable in python: passing ...READ MORE

answered Nov 16, 2018 in Python by Nymeria
• 3,520 points
9,622 views