Skip to main content

Command Palette

Search for a command to run...

Python Basics — Day 1(Python Setup & Basic Functions )

Updated
2 min read
S

Aspiring Full-Stack Developer | Python · Django · React · SQL | documenting my learning journey

Building skills in Python and full-stack development, with a focus on web apps and system design

Junior developer in training — Python, Django, React — preparing for a career in full-stack engineering

From Python basics to full-stack projects, sharing my progress as I grow into a developer

Future full-stack engineer | Learning in public: Python, APIs, Databases, and Web Development

I upload these materials primarily for my own self-study. Still, I hope they might be helpful to someone else as well.

Day 1 — Python Setup & Basic Functions (print, type)

01. Setting up the Environment

  • Install Python (version 3.10+ recommended)

  • Install VS Code (IDE)

  • Check Python installation in the terminal

python --version   # Check version
python             # Enter Python shell 
exit()             # Exit shell

02. print() Function

  • Used to display text or variables on the screen.
# Print text 
print("Hello, Python!")
# Print multiple values 
print("My age is", 25)
# Print with f-string 
name = "Sabin"
print(f"My name is {name}")

03.type() Function

  • type() shows the data type of a variable.
# Integers 
a = 10
print(type(a))  # <class 'int'>
# Floating point numbers 
b = 3.14
print(type(b))  # <class 'float'>
# Strings 
c = "Hello"
print(type(c))  # <class 'str'>
# Boolean 
d = True
print(type(d))  # <class 'bool'>

04. Practice Examples

📝 Example 1

print("Welcome to Python!")   # Print a welcome message /

📝 Example 2

x = 42
print("Value:", x)             # Value: 42
print("Type:", type(x))        # Type: <class 'int'>

📝 Example 3

name = "Sabin"
age = 30
print(f"My name is {name}, I am {age} years old.")
# My name is Sabin, I am 30 years old.

Python Basics

Part 1 of 21

A collection of study notes from my university and self-learning journey. This series covers Python fundamentals step by step — from setup to core concepts — to help both myself and others build a solid foundation in coding.

Up next

Python Basics — Day 2(Variables and Data Types)

01. What is a Variable? A variable is like a label that stores data. Use the = operator to assign a value. x = 10 # Integer (int) y = 3.14 # Floating-point number (float) name = "Sabin" # String (str) is_ok = True # Boolean (b...

More from this blog

S

Sabin’s DevLog

21 posts

I plan to upload everything I study and prepare here. I hope it can be helpful to others, and I also want my future self to see the learning journey I’ve been through.