Getting Started with Python: Installing Python and Writing Your First Program (Day 2 of 100 Days of Python)

In the last blog, we talked about how a programmer is someone who writes a series of steps (called a program) for a computer to follow. Today, we’ll dive deeper into different types of software and create our first Python program.

Program vs …


This content originally appeared on DEV Community and was authored by All About Python

In the last blog, we talked about how a programmer is someone who writes a series of steps (called a program) for a computer to follow. Today, we'll dive deeper into different types of software and create our first Python program.

Program vs Software

Before learning about different types of software, let's first understand what software is. Simply put, software is a collection of programs, data, and instructions that work together. For example, a railway ticket booking system is software because it includes different programs that handle tickets and data for trains and passengers.

Types of Software

System Software

System software manages hardware and allows users to run applications. Examples include operating systems like Windows and MacOS, as well as utilities like calculators or terminals. Think of it as the software that makes your computer run.

Application Software

Application software helps users complete specific tasks. Any software you directly use on your computer—like Chrome, Excel, WhatsApp, or Instagram—is application software. These can be grouped into different categories, like:

  1. Productivity Software: word, powerpoint, excel etc,
  2. Web Browsers: Google Chrome, Microsoft Edge, Mozilla Firefox etc.
  3. Multimedia Software: VLC Media Player, Adobe Premier Pro, Adobe Photoshop etc.
  4. Communication Software: Outlook, WhatsApp etc.

and many more...

Installing Python

Before we start coding in Python, we need to install it. Here's how you can do that (we’ll be using MacOS, but Windows users can follow similar steps with slight changes):

Step 1: Go to python.org and download Python by clicking the yellow button (the version might differ, but that’s okay).
Step 2: Once downloaded, run the installer and follow the steps.
Step 3: For Windows, during installation, make sure to check the "Add Python to PATH" option.
Step 4: After installing, open the terminal (or command prompt for Windows) and type:

For MacOS/Linux:

python3 --version

For Windows:

python --version

In both the cases, the output (based on version) should look something like this

Python 3.11.5

This confirm the successful download and installation of python, If you still have issues with download, you can checkout this video I made some time back (at the top of the blog), regarding the same.

Installing Visual Studio Code

We will also install another software, named visual studio code (short form vscode) to write the Python code. The installation process is very simple.

Step 1: Go to https://code.visualstudio.com and click on the download button (based on your operating system).
Step 2: Wait for the download to complete, and go through the installation wizard (just keep clicking on next, no need to change the default configuration).
Step 3: To confirm installation, check for Visual Studio Code installed in your applications on your system.

Writing our first program

Now, let’s write the famous "Hello, World" program. This simple program is a rite of passage for every new programmer.

  1. Open VSCode, click 'File' > 'Open Folder,' and choose an empty folder (or create a new one named "First Program").
  2. On the left panel, click the file+ icon to create a new file and name it main.py.
  3. In the file, type or copy the following code:
print("Hello World")

This program simply instructs the computer to display the text "Hello World" on the console. To run, first click on Ctrl + S (or Cmd + S for MacOS) and simply open the terminal from vscode through the terminal option in title bar. Once done, type the following command:

For Windows:

python main.py

For MacOS:

python3 main.py

The program should give an output like this.

Hello World

Congratulations! you just created your first python in Python. And with this, we can end this blog.

Homework Assignment: Customize your program

A little homework assignment for you all, try to change this program to print "Hello" and your name (like "Hello John Doe").

Looking Forward

For the next blog, we will dive deep in some terminologies related to Python programming (and programming in general) and create much more interesting programs.


This content originally appeared on DEV Community and was authored by All About Python


Print Share Comment Cite Upload Translate Updates
APA

All About Python | Sciencx (2025-01-13T13:06:27+00:00) Getting Started with Python: Installing Python and Writing Your First Program (Day 2 of 100 Days of Python). Retrieved from https://www.scien.cx/2025/01/13/getting-started-with-python-installing-python-and-writing-your-first-program-day-2-of-100-days-of-python/

MLA
" » Getting Started with Python: Installing Python and Writing Your First Program (Day 2 of 100 Days of Python)." All About Python | Sciencx - Monday January 13, 2025, https://www.scien.cx/2025/01/13/getting-started-with-python-installing-python-and-writing-your-first-program-day-2-of-100-days-of-python/
HARVARD
All About Python | Sciencx Monday January 13, 2025 » Getting Started with Python: Installing Python and Writing Your First Program (Day 2 of 100 Days of Python)., viewed ,<https://www.scien.cx/2025/01/13/getting-started-with-python-installing-python-and-writing-your-first-program-day-2-of-100-days-of-python/>
VANCOUVER
All About Python | Sciencx - » Getting Started with Python: Installing Python and Writing Your First Program (Day 2 of 100 Days of Python). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/13/getting-started-with-python-installing-python-and-writing-your-first-program-day-2-of-100-days-of-python/
CHICAGO
" » Getting Started with Python: Installing Python and Writing Your First Program (Day 2 of 100 Days of Python)." All About Python | Sciencx - Accessed . https://www.scien.cx/2025/01/13/getting-started-with-python-installing-python-and-writing-your-first-program-day-2-of-100-days-of-python/
IEEE
" » Getting Started with Python: Installing Python and Writing Your First Program (Day 2 of 100 Days of Python)." All About Python | Sciencx [Online]. Available: https://www.scien.cx/2025/01/13/getting-started-with-python-installing-python-and-writing-your-first-program-day-2-of-100-days-of-python/. [Accessed: ]
rf:citation
» Getting Started with Python: Installing Python and Writing Your First Program (Day 2 of 100 Days of Python) | All About Python | Sciencx | https://www.scien.cx/2025/01/13/getting-started-with-python-installing-python-and-writing-your-first-program-day-2-of-100-days-of-python/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.