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,100 points
6,406 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,780 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, 2019 in Python by Mohammad
• 3,230 points
1,044 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, 2019 in Python by Mohammad
• 3,230 points
1,993 views
0 votes
2 answers

Do-while loop in Python

A more pythonic way would be this: ``` while ...READ MORE

answered Jul 6, 2020 in Python by Composer3
1,400 views
0 votes
2 answers

Indentation Error in Python

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

answered Feb 15, 2019 in Python by Shashank
• 1,370 points
882 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
• 58,020 points
7,659 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
• 58,020 points
1,444 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,300 points
1,481 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 aryya
• 7,460 points
1,039 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
1,717 views
+2 votes
10 answers

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,560 points
409,261 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP