Getting Started with Python
Python is a very versatile language.
Installing Python
To start using python you need to install it first. Follow these steps:
- Visit the official Python website: https://www.python.org/downloads/
- Download the recommended version of Python for your operating system (Windows, macOS, or Linux).
- Run the installer and follow the installation instructions.
After installation, you can try to type python
to verify weather python has been installed. If you have there should be a python interpreter prompt.
Hello World!
Lets try to make a "Hello, World!" program with Python:
print("Hello, World!")
Now save this code in a file with the .py
extension (for example, hello.py
). Open a terminal, navigate to the file's directory, and run it using the command:
python hello.py
The output should be Hello, World!
on the terminal.