Logo

dev-resources.site

for different kinds of informations.

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

Published at
1/13/2025
Categories
python
programming
beginners
Author
allaboutpython
Categories
3 categories in total
python
open
programming
open
beginners
open
Author
14 person written this
allaboutpython
open
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 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
Enter fullscreen mode Exit fullscreen mode

For Windows:

python --version
Enter fullscreen mode Exit fullscreen mode

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

Python 3.11.5
Enter fullscreen mode Exit fullscreen mode

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")
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

For MacOS:

python3 main.py
Enter fullscreen mode Exit fullscreen mode

The program should give an output like this.

Hello World
Enter fullscreen mode Exit fullscreen mode

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.

python Article's
30 articles in total
Favicon
Contribute to `real-to-sim-to-real` in SmilingRobo Open-Source Sprint!
Favicon
A Complete Beginner’s Guide to Python Training Course
Favicon
Solving Circular Dependencies: A Journey to Better Architecture
Favicon
How to Build a Google Trends Scraper | Scraping Browser Guide 2025
Favicon
Protect Your APIs from Abuse with FastAPI and Redis
Favicon
How to solve the problem of limited access speed of crawlers
Favicon
The Complete Introduction to Time Series Classification in Python
Favicon
Working with Files Asynchronously in Python using aiofiles and asyncio
Favicon
Simplify Python-Informix Connections with wbjdbc
Favicon
Train LLM From Scratch
Favicon
5 Advanced Python Web Crawling Techniques for Efficient Data Collection
Favicon
Vyper - Write your First Python Smart Contract (Series)
Favicon
Extract structured data using Python's advanced techniques
Favicon
🚀 Excited to share my latest project: Local LLM Chat Application!
Favicon
Build an AI code review assistant with v0.dev, litellm and Agenta
Favicon
Building a BLE Real-Time macOS Menu Bar App
Favicon
I am a beginner in Python programming and I want to develop my skills.
Favicon
FastHTML and Heroku
Favicon
Making a Todo API with FastAPI and MongoDB
Favicon
Fine-Tuning Large Language Models (LLMs) with .NET Core, Python, and Azure
Favicon
GraphDB for CMDB
Favicon
Exporting Mac OSX Book Highlights into an Obsidian Vault or Markdown Files
Favicon
Getting Started with Python: Installing Python and Writing Your First Program (Day 2 of 100 Days of Python)
Favicon
Typed integers in Rust for safer Python bytecode compilation
Favicon
How do I measure the execution time of Celery tasks?
Favicon
A Developer's Guide to Odoo CRM Customization
Favicon
Build Code-Action AI Agents with freeact
Favicon
The Core of FastAPI: A Deep Dive into Starlette 🌟🌟🌟
Favicon
Pythonizing JavaScript
Favicon
🔧 Generative AI Developer Week 2 - Day 3: Data Preprocessing

Featured ones: