Everyone gets started from this step. So here is a quick python tutorial, that teaches you how to set up your python environment and run a hello world application in python.
We are not doing too much in this tutorial. we will just print a string 'hello world' to the screen.
To run a hello world application. Make sure you have a Python environment set up. Check out this article if you do not know how to install python with a Full setup.
Write Hello World in Python
Once you have python installed. Create a python file. Python file ends with .py extension.
Copy and paste the following code into your .py file.
# This is simple program to show how print statement works
print('Hello Python World')
Now open your terminal in the current directory and run the following command. If you or on windows, you will be using python app.py
or if you or on the mic, you will write python3 app.py
.
If you are on windows then run
>>python app.py
If you or on Mic or Linux
$python3 app.py
Output
You Might Also Like to read
- Create Analog Clock with Python Turtle Module
- Create an Alarm Clock With Python - Python Project
- Create an Amazing Art With Python Turtle - Pickachu Character
- How to Create Decimal to Binary Converter with tkinter Python
- Python Turtle Project - Create Doraemon Character
- Python Will Recommend you A Movie Name
Summary and conclusion
In this article, you have seen how you can print a simple hello world string to the screen.