Hello World In Python


Download Python

  • You can download Python from here.
  • The most stable version of Python is Python 2.7. You can download Python 2.7 from here.

Environment Setup

  • First you need to install Python to your computer system.
  • You can run Python programs by mainly 3 ways –
    • Using IDLE
    • Using Notepad
    • Using PyCharm.

Hello World Using IDLE.

 

 

  • Type IDLE in start menu.

  • Click on IDLE (Python 3.5 64-bit) (Version may change). Then a new IDLE will be opened like this.

  • Now type the following statements –

print (“Hello world”)

print (‘Hello World’)

Note –

  • Earlier versions of Python supports print statement and print() function both. Since Python 3 only print() can be used.
  • Don’t mix single quotes with double quotes. Hence print(“Hello World’) is syntax error.
  • Semicolon (;) at the end of Python statement is optional.