First Python Program Write and Run
Write Hello World In Python
- Open your IDE or source code editor
- Create New File
- Save File As
filename.py
(don't forget to add extension .py ) - Write the first program which is given Example below
print("Hello World")
Run the python program using IDE is very simple, Click on Run Button and see the console for the output "Hello World" .
Run Python Program Using Command Prompt Or Terminal
Follow these step to run python program using Terminal
- Open your Terminal in python file directory
- Run the Command
python filename.py
orpy filename.py
- OR, In your terminal put the command
python filepath
(if you have not open your terminal in python file directory). - Congratulations! You have successfully run python program.