Python From Scratch

Deepika ChandDeepika Chand
3 min read

Introduction

To be honest, I have been learning Python for almost a year now. Yet I still feel incompetent when it comes to solving any sort of Python question. I can write a few programs and understand how the code works. However, I’m unable to write any code from scratch. The problem is that I decided that one day I would master Python, and here I am struggling with the basics. I have tried several ways, taken a course, worked on projects, and asked ChatGPT, yet I don’t feel confident about my learning and skills. This is the only option left for me now to improve my skills. Plus, I think this will help to grow as a Technical Writer too. A win is a win, I guess.

Let’s get started!

Introduction to Python

Python is one of the most beginner-friendly programming languages, known for its simple syntax and wide use in fields like data science, web development, and automation. As I restart my Python learning journey, I want to begin by setting up the basics, the tools, environment, and some foundational rules to get comfortable again.

Setting Up Python

Before writing any code, you’ll need to install Python on your system. Here's how:

1. Install Python

Go to the official website: https://www.python.org/downloads

Download the latest version (usually Python 3.x), and follow the instructions for your operating system.

Tip: During installation, check the box that says "Add Python to PATH"; it saves you a lot of trouble later!

Choosing an IDE

An IDE or code editor helps you write and run your code easily. Here are a few beginner-friendly options:

VS Code (Visual Studio Code) – Lightweight and highly customizable.

https://code.visualstudio.com

Jupyter Notebook – Best for data science and writing code in chunks with output below.

➤ Install via Anaconda: https://www.anaconda.com

PyCharm – A more heavy-duty IDE with excellent features for Python.

https://www.jetbrains.com/pycharm

For this series, I’ll mostly use VS Code and Jupyter Notebook, depending on the task.

Basic Python Syntax Rules

Before diving into writing code, it helps to remember some of the basic Python rules:

1. Indentation Matters

Unlike other languages, Python uses indentation instead of curly braces:

2. Comments

Use # for single-line comments and ''' ''' or """ """ for multi-line docstrings.

3. Case-Sensitive

Variables like Name and name are treated as two different things.

4. Variables Don’t Need Declarations

You can simply assign values like:

5. Print Statements

Printing to the console is simple:

This setup is all you need to get started. Whether you're a beginner or someone returning to Python like me, building a strong foundation makes all the difference.

0
Subscribe to my newsletter

Read articles from Deepika Chand directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Deepika Chand
Deepika Chand