How to print Hello World in Python

Hello World in Python

Objectives:

  • How to write Hello World in Python?
  • How to print Hello World in Python?
  • How to print a new line in Python?
  • How to print a blank line in Python?
  • How to run the Python Code?
  • How to execute the Python Code?

 

Code:

[sourcecode language=”python”]
print("Hello, World!")
print() # prints a new or blank line, works as "\n"
print("Hi")
[/sourcecode]

Please refer above code to print Hello World in Python

 

Steps to Run the above code:

  • Navigate to the folder/directory where you have saved your python code or file.
  • Here I have considered that python file is saved on “c:\>” and the File name is “HelloWorld.py
  • Just type the following command now to execute the Python program: c:\> python HelloWorld.py

 

Download code:

  • Navigate to GitHub repository and download the code from here: 001_Hello.py

 

We conduct Python Training and Workshop for Corporates and College Students, if interested, please write to us on kloudsancyber@gmail.com

 

Aatul Palandurkar
Life Coach, International Trainer, and Author

https://www.facebook.com/aatulpalandurkar
https://www.instagram.com/aatulpalandurkar/