First Project

What do I require to run Python?

Python is really easy to use. To start using Python you will need following

  • An Operating System for example Window or Mac or Linux etc
  • Text Editor (IDE) for example PyCharm or Visual Studio Code etc
  • Python, that will run Python programmes

Set-up your Python environment

Depending on your operating system you might need to install Python. If you are using Apple Mac then chances are that you already have python installed. However, you can always update it to latest version of Python. On Windows PC you can easily download and install Python.

  1. Head to the official Python website and download it from here: https://www.python.org/downloads/
  2. Once you have downloaded Python to your computer, simply click on the downloaded file and follow the installation wizard.
  3. After installing Python, download an IDE (Software that you will use to write and edit your Python code). There are many options available for Python IDE. Have a look at a free version of PyCharm https://www.jetbrains.com/pycharm/ or Visual Studio Code https://code.visualstudio.com/download.
  4. Once you had installed your IDE, now it’s time to test your Python set-up

Set a new project in PyCharm

After you have successfully installed Python and PyCharm on your computer, you are ready to start. To work with Python you can use any code editor or IDE (Integrated Development Environment), but we will use PyCharm.

STEP 1: Launch PyCharm and either select “Create new project” or browse to File Menu and select “New Project”. On Create Project window, assign a name to your project. In example below, we have named our project MyFirstProject. We are using Python 3.8 as our interpreter. You can use the most recent available in your PyCharm.

create_new_project_pycharm

STEP 2: Right click on your MyFirstProject Folder and select New->Python File. This will create a new blank python file.

create_new_file_pycharm

STEP 3: Assign LearnPython name to your new python file.

first_python_file

STEP 4: type print(“Welcome to Python”) on your LearnPython file and then right click on the file and select “Run ‘LearnPython'”

run_python_programme

STEP 5: By running the print command (which will be explained later) you have just executed your first python code. You will find “Welcome to Python” in your Run windows as shown in picture below.

python_result

 

Congratulations, you have just set-up your python environment and run your first python code.

Happy coding!