Mastering Python: Day 1 — Installing and Getting Started with Python

Risky Mulya Nugraha
3 min readSep 1, 2023

--

Welcome to Mastering Python: Day 1

In this series, we’ll dive into the world of Python step by step, starting with the basics. Today, we begin with the installation and introduction to Python, a versatile and beginner-friendly programming language that has gained immense popularity in recent years.

Part 1: Introduction to Python

Python is a versatile and beginner-friendly programming language that has gained immense popularity in recent years. But what exactly is Python, and why is it such a favored choice among beginners?

Python’s Versatility: Python is known for its versatility; it can be used in web development, data analysis, scientific computing, automation, and more. Its syntax is clear and concise, making it easy for newcomers to grasp.

Community and Support: Python boasts a vibrant and supportive community. There are numerous online resources, forums, and documentation available to help you on your Python journey. From beginner tutorials to advanced discussions, Python enthusiasts are always ready to assist.

Python’s History: Python was created by Guido van Rossum and was first released in 1991. It has since gone through several versions and updates, with a large and active community contributing to its growth.

Part 2: Installing Python Interpreter

Before we dive into coding, you’ll need to set up your Python development environment. Don’t worry; it’s a straightforward process. Follow these steps to get Python up and running on your computer and use PyCharm as your code editor:

Step 1: Download Python: Visit the official Python website at https://www.python.org/downloads/ and download the Python installer for your operating system (Windows, macOS, or Linux).

Step 2: Installation: Run the Python installer you downloaded and follow the on-screen instructions. Make sure to check the option that says “Add Python to PATH” during installation; this will make it easier to run Python from the command line.

Select “customize installation” so that we can configure the Python directory for easy access (C:\Python311) and click “install.”

Part 3: Using PyCharm as Your Code Editor, Write and Run Your First Python Program

Now that you have Python installed, let’s set up PyCharm as your code editor.

  1. Download and Install PyCharm: Visit the official JetBrains PyCharm download page at https://www.jetbrains.com/pycharm/download/. This time, we will be using the PyCharm Community Edition. Download the installer for your operating system.
  2. Install PyCharm: Run the PyCharm installer and follow the on-screen instructions to install PyCharm on your computer.
  3. Open PyCharm: After installation, open PyCharm, and create a new project. Then, specify the directory and project name.
  4. Configure Python Interpreter in PyCharm:
  • Choose either “System Interpreter” or “Virtualenv Environment” based on your preference.
  • This time, we will be using a Virtualenv Environment.
  • Uncheck the “Welcome Script” and click “Create” to confirm.

5. Writing and Running Your First Python Program:

With Python installed and PyCharm set up as your code editor, let’s write and execute your very first Python program using PyCharm.

Follow these steps:

  1. Right-click on the newly created folder (my_first_python).
  2. Select “New File” and name it first.py, then press Enter.
  3. Write the code:
print("Hello World!")

4. Run the code using the play button in the middle of the top bar. You should see “Hello World!” displayed in the PyCharm console.

Congratulations! You’ve successfully executed your first Python program using Python installed from python.org and PyCharm as your code editor. You’re now on your way to mastering Python. Tomorrow, we’ll delve deeper into Python’s fundamentals, exploring variables, data types, and basic operations. Get ready for an exciting journey ahead!

--

--