How to use print statement in python

Question:

How do I write hello world in python? I can’t run my python program after typing hello world.

Print(hello world)

Isn’t it the right way. I don’t know I am new at this how do I do?

Asked By: Hisham shafi

||

Answers:

First of all change the question name to something related to the question.

Your answer:

change Print(hello world) to print("Hello World") and this might solve the problem.

You used capital P and typed hello world without quotation marks ""

Answered By: an4s911

You need to change Print(Hello World) to print("Hello World") or you’ll get a syntax error. You should also have a Python interpreter. I suggest you should download Python 3.8 from Python.org. Then you’ll need to run IDLE or an editor and then you should write your code. You can run it with F5 or with the Run button.

Answered By: Wrench56

You should use „“. This way, python knows, that you want to print a string. If you don’t use „“ python wants to print a variable called hello world but the variable doesn’t exist.
Also, you should write print with a small p.

Answered By: Bseeda

You have to use print("hello world") as this is the correct syntax. You have to add "" for strings also you have to use small p instead of capital P.

Answered By: Piyush
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.