Learn to Code Python For Beginners

learn to code python
You are currently viewing Learn to Code Python For Beginners
learn to code python

Learn to Code Python For Beginners

Welcome to this blog, where we will Learn to code Python from scratch. This blog will contain tutorials in the form of lessons, notes, and videos.

Learn to Code Python – Part 1 – Basics

📘 Section 1: What is Python and Programming?

💡 Programming

Programming means giving step-by-step instructions to a computer to perform a task — like telling a robot what to do.

💡 Python

Python is a simple and powerful programming language used in web development, data science, automation, and more.


⚙️ Section 2: Setting Up Python

✅ Step 1: Install Python

You need Python installed to write and run your code. Download it from python.org.

✅ Step 2: Install VS Code

VS Code is a code editor where you write Python scripts. It makes coding easier with suggestions, error checks, and a terminal.


🧠 Section 3: Python Basics

📌 Data Types

Python has different types of data, just like real life:

TypeExamplePython Name
Text"hello"str
Number24int
Decimal59.7float
True/FalseTrue or Falsebool

📌 Variables

Variables are containers to store data.

name = "Kunal"
age = 24
is_married = False

Think of a cup holding water – the cup is the variable, and the water is the data.


🧪 Section 4: Type, Input, and Conversion

📌 type() Function

This shows what type of data a variable has.

print(type(name))  # str
print(type(age)) # int

📌 Getting User Input

We can ask users questions and store their answers.

name = input("What is your name? ")

🔁 Section 5: Data Conversion and F-Strings

📌 Type Conversion

Sometimes we need to change data from one type to another.

age = int(input("Enter your age: "))

📌 f-Strings

This is a cool way to write dynamic messages:

name = "Kunal"
age = 24
print(f"My name is {name} and I am {age} years old.")

🧮 Section 6: Lists and Operators

📌 Operators in Python

Operators are used to perform calculations:

SymbolMeaningExample
+Addition2 + 3 = 5
-Subtraction5 - 2 = 3
*Multiplication3 * 2 = 6
/Division6 / 3 = 2.0
//Floor Division7 // 2 = 3
%Modulus7 % 2 = 1

📌 Lists

A list is a collection that can store multiple values:

fruits = ["apple", "banana", "mango"]
print(fruits[0]) # apple

Lists can even store different data types.


🧠 Recap of What You’ve Learned in Part 1:

  • What programming is and why Python is a great choice
  • How to install Python and VS Code
  • Variables and Data Types
  • Checking data types using type()
  • Taking user input
  • Converting data types
  • Using f-strings for clean output
  • Working with lists and operators

Learn to Code Python – Part 2 – Operators

Coming Soon

Kunal Lonhare

I am the founder of Kuku Courses