Showing posts with label Bootcamp. Show all posts
Showing posts with label Bootcamp. Show all posts

Sunday, 26 April 2026

Python Bootcamp May 2026 Syllabus

 


“Code to Confident: 10 Days to Python Mastery for Beginners”

A beginner-friendly, hands-on bootcamp designed to take students from zero to real-world Python projects in just 10 days.


๐ŸŽฏ Who This Bootcamp Is For

  • Absolute beginners (no coding experience)
  • School/college students
  • Career switchers
  • Anyone who wants to start Python the right way

๐Ÿ“… Duration

10 Days (Daily 1.5–2 Hours)

  • Assignments + Mini Projects

๐Ÿ“š Detailed Syllabus

๐ŸŸข Day 1: Python Kickstart

  • What is Python & where it’s used
  • Installing Python + Jupyter Notebook
  • First program: Hello World
  • Variables & Data Types (int, float, string)

๐Ÿ‘‰ Assignment: Simple input/output programs


๐ŸŸข Day 2: Operators & User Input

  • Arithmetic, comparison, logical operators
  • Taking user input
  • Type casting

๐Ÿ‘‰ Mini Task: Build a simple calculator


๐ŸŸข Day 3: Conditional Statements

  • if, elif, else
  • Nested conditions
  • Real-life decision problems

๐Ÿ‘‰ Assignment: Number guessing logic


๐ŸŸข Day 4: Loops Mastery

  • for loop, while loop
  • Break & Continue
  • Pattern programs

๐Ÿ‘‰ Mini Project: Multiplication table generator


๐ŸŸข Day 5: Strings Deep Dive

  • String operations & slicing
  • String methods
  • Real-world text problems

๐Ÿ‘‰ Assignment: Palindrome checker


๐ŸŸข Day 6: Lists & Tuples

  • Lists (add, remove, sort)
  • Tuples basics
  • Iterating through collections

๐Ÿ‘‰ Mini Task: Student marks analyzer


๐ŸŸข Day 7: Dictionaries & Sets

  • Key-value logic
  • Dictionary operations
  • Set operations

๐Ÿ‘‰ Assignment: Contact book program


๐ŸŸข Day 8: Functions & Code Reusability

  • Defining functions
  • Arguments & return values
  • Lambda basics (intro)

๐Ÿ‘‰ Mini Project: Modular calculator


๐ŸŸข Day 9: File Handling + Real Use Case

  • Reading & writing files
  • Working with .txt files
  • Intro to automation

๐Ÿ‘‰ Mini Project: Notes saver app


๐ŸŸข Day 10: Final Project Day ๐Ÿš€

  • Build a complete project:
    • Quiz App / To-Do App / Password Generator
  • Code review + improvement tips
  • Career roadmap in Python

๐ŸŽ What Students Will Get

  • Notes + Assignments
  • Project files
  • Certificate of completion
  • Recording access

Tuesday, 21 April 2026

April Python Bootcamp Day 14


 

Day 14: File Handling in Python

File handling is a fundamental concept in Python that allows programs to store and retrieve data from files. Unlike variables, which store data temporarily in memory, files help persist data permanently.

Why File Handling is Important

File handling is widely used in real-world applications. It helps in:

  • Saving user data (such as login systems)
  • Storing logs for debugging and monitoring
  • Working with datasets in data science
  • Reading configuration files for applications

Types of Files in Python

Python mainly works with two common types of files:

1. Text Files (.txt)

These store plain text data and are human-readable.

2. CSV Files (.csv)

CSV stands for Comma Separated Values and is used to store structured data in tabular form.


File Modes in Python

When working with files, Python provides different modes:

  • r → Read file
  • w → Write file (overwrites existing content)
  • a → Append data to file
  • r+ → Read and write

Opening and Closing Files

Basic syntax:

file = open("example.txt", "w")
file.write("Hello, this is Day 14 of Python Bootcamp\n")
file.close()

A better and recommended approach is using the with statement:

with open("example.txt", "r") as f:
content = f.read()
print(content)

This automatically handles closing the file.


Working with Text Files

Writing to a File

with open("example.txt", "w") as f:
f.write("Learning File Handling\n")

Appending Data

with open("example.txt", "a") as f:
f.write("Adding new content\n")

Reading Entire File

with open("example.txt", "r") as f:
content = f.read()
print(content)

Reading Line by Line

with open("example.txt", "r") as f:
for line in f:
print(line.strip())

Reading All Lines into a List

with open("example.txt", "r") as f:
content = f.readlines()
print(content)

File Pointer Concepts

Python maintains a pointer to track the current position in the file.

f.tell() # gives current position
f.seek(0) # moves pointer to beginning

Working with CSV Files

CSV files are used to store tabular data. Python provides the csv module to handle them efficiently.

Writing CSV Data

import csv

data = [
["Name","Age","City"],
["Piyush","21","Gangtok"],
["Rahul","22","Mumbai"]
]

with open("data.csv", "w", newline="") as f:
writer = csv.writer(f)
writer.writerows(data)

Reading CSV Data

with open("data.csv", "r") as f:
reader = csv.reader(f)
for row in reader:
print(row)

Using DictReader

with open("data.csv", "r") as f:
reader = csv.DictReader(f)
for row in reader:
print(row["Name"], row["Age"])

Writing CSV using Dictionary

import csv

data = [
{"Name":"Aman","Age":30},
{"Name":"Rohan","Age":23}
]

with open("data.csv", "w", newline="") as f:
fieldnames = ["Name","Age"]
writer = csv.DictWriter(f, fieldnames=fieldnames)

writer.writeheader()
writer.writerows(data)

Common Errors in File Handling

  • FileNotFoundError: Occurs when file does not exist
  • Using wrong mode: For example, trying to read in write mode
  • Forgetting to close file (if not using with)

Real-Life Example

Taking user input and storing it in a CSV file:

import csv

n = int(input("How many entries do you want to add?"))
data = []

for i in range(n):
print(f"\nEnter details for person {i+1}")
name = input("Enter name: ")
age = input("Enter age: ")
city = input("Enter city: ")

data.append([name, age, city])

with open("person.csv", "w", newline="") as f:
writer = csv.writer(f)
writer.writerow(["Name","Age","City"])
writer.writerows(data)

print("Data successfully written to person.csv")

Assignment Questions

Basic Level

  1. Create a text file and write 5 lines into it.
  2. Read a text file and print its content.
  3. Append a new line to an existing file.
  4. Read a file line by line and print each line.

Intermediate Level

  1. Count the number of words in a text file.
  2. Count how many lines are present in a file.
  3. Read a file and print only lines that contain a specific word.
  4. Use seek() and tell() to demonstrate file pointer movement.

CSV Based Questions

  1. Create a CSV file with student details (Name, Marks, City).
  2. Read the CSV file and display all records.
  3. Print students who have marks greater than 80.
  4. Use DictReader to access specific columns.

Advanced Level

  1. Take user input and store it in a CSV file.
  2. Convert a text file into CSV format.
  3. Build a small program to search for a student in a CSV file.

Conclusion

File handling is a critical concept in Python that enables real-world application development. From saving user data to working with datasets, mastering file operations is essential for any developer, especially in data science and backend development.

Monday, 20 April 2026

April Python Bootcamp Day 13

 

What is a Module?

A module is a single Python file (.py) that contains functions, variables, or classes which can be reused in other programs.

Example:
If you create a file named utils.py, it becomes a module.

Why modules are important:

  • Promote code reusability
  • Help in organizing large codebases
  • Reduce redundancy

What is a Package?

A package is a folder that contains multiple modules.

Structure example:

my_package/
├── module1.py
├── module2.py
└── __init__.py

Packages allow you to structure your project logically and scale your code efficiently.


Importing Modules

There are multiple ways to import modules:

1. Import Entire Module

import math
print(math.sqrt(16))

2. Import Specific Functions

from math import sqrt, ceil

print(sqrt(16))
print(ceil(4.2))

3. Using Module Alias

import math as m
print(m.factorial(5))

Built-in Modules in Python

Python provides many built-in modules that simplify development.


Math Module

Used for mathematical operations.

import math

print(math.sqrt(16))
print(math.ceil(4.2))
print(math.floor(4.9))
print(math.pow(2, 3))
print(math.factorial(5))

Common functions:

  • sqrt()
  • ceil()
  • floor()
  • pow()
  • factorial()

Random Module

Used for generating random values.

import random

print(random.random())
print(random.randint(1, 10))
print(random.choice([1, 2, 3, 4]))

Shuffling example:

lst = [1, 2, 3, 4]
random.shuffle(lst)
print(lst)

Other function:

  • uniform(a, b) → random float between a and b

Datetime Module

Used for working with dates and time.

from datetime import datetime, date, timedelta

print(datetime.now())
print(date.today())

d = datetime.now()
print(d.strftime("%Y-%m-%d"))

new_date = d + timedelta(days=5)
print(new_date)

Key functionalities:

  • Current date and time
  • Formatting dates
  • Date arithmetic

OS Module

Used for interacting with the operating system.

import os

print(os.getcwd())
print(os.listdir())

Common operations:

  • Get current directory
  • List files
  • Create/delete folders
  • Rename files

Key Takeaways

  • Modules help reuse code
  • Packages help organize large projects
  • Built-in modules save development time
  • Proper imports improve code readability

Assignment Questions

Basic Level

  1. Import the math module and find square root of a number
  2. Import specific functions from math and use ceil() and floor()
  3. Generate a random number between 1 and 50
  4. Print current date using datetime
  5. Print current working directory using os

Intermediate Level

  1. Generate a list of 5 random numbers using random.randint()
  2. Shuffle a list of numbers using random.shuffle()
  3. Format current date as DD-MM-YYYY
  4. Create a program to add 7 days to current date
  5. List all files in your current directory

Advanced Level

  1. Create your own module with functions (e.g., add, subtract) and import it
  2. Create a package with at least 2 modules and use them
  3. Build a mini project using math and random (e.g., number guessing game)
  4. Write a script to organize files in a folder using os
  5. Combine datetime and os to log file creation time

Summary

Modules and packages are fundamental for writing scalable Python applications.

  • Modules allow code reuse
  • Packages provide structure
  • Built-in modules handle complex operations easily

Understanding this concept is essential before moving into:

  • Large projects
  • Frameworks
  • Real-world software development

April Python Bootcamp Day 12


 

Lambda Functions

A lambda function is a small, anonymous function written in a single line. It does not require a function name or the def keyword.

Syntax

lambda arguments: expression

Key characteristics:

  • No function name
  • No def keyword
  • Only one expression allowed
  • Used for short and simple operations

Normal Function vs Lambda Function

Normal Function

def add(a, b):
return a + b

print(add(4, 5))

Lambda Function

add1 = lambda a, b: a + b
print(add1(2, 3))

Another example:

square = lambda x: x ** 2
print(square(5))

Lambda functions are useful when you need a quick function for a short period of time.


Higher Order Functions

A higher order function is a function that:

  • Takes another function as input, or
  • Returns a function as output

Common examples include:

  • map()
  • filter()
  • sorted()

map() Function

Applies a function to every element of an iterable.

nums = [1, 2, 3, 4, 5]

result = list(map(lambda x: x * 2, nums))
print(result)

Output:

[2, 4, 6, 8, 10]

filter() Function

Filters elements based on a condition.

nums = [1, 2, 3, 4, 5]

even = list(filter(lambda x: x % 2 == 0, nums))
print(even)

Output:

[2, 4]

sorted() with Lambda

Used for custom sorting logic.

students = [("Piyush", 20), ("Rahul", 18), ("Amar", 24)]

sorted_list = sorted(students, key=lambda x: len(x[0]))
print(sorted_list)

This sorts based on the length of names.


Key Points About Lambda Functions

  • Best for short and simple logic
  • Can take multiple arguments
  • Limited to a single expression
  • Not suitable for complex logic

Recursion

Recursion is a technique where a function calls itself to solve a problem.


Rules of Recursion

Every recursive function must have:

  1. Base Case
    Condition where recursion stops
  2. Recursive Case
    Function calling itself

Without a base case, recursion will lead to infinite calls and crash the program.


Example: Print Numbers

def print_nums(n):
if n > 5: # Base case
return
print(n, end=" ")
print_nums(n + 1)

print_nums(1)

Output:

1 2 3 4 5

Example: Factorial Using Recursion

def factorial(n):
if n == 1:
return 1
return n * factorial(n - 1)

print(factorial(5))

When to Use Recursion

  • When a problem can be broken into smaller subproblems
  • Tree structures
  • Backtracking problems
  • Divide and conquer algorithms

When Not to Use Recursion

  • When it increases complexity unnecessarily
  • Risk of stack overflow
  • When a loop provides a simpler solution

Assignment Questions

Basic Level

  1. Create a lambda function to add two numbers
  2. Write a lambda function to find square of a number
  3. Use map() with lambda to multiply all elements of a list by 3
  4. Use filter() to get all odd numbers from a list
  5. Sort a list of integers using lambda

Intermediate Level

  1. Use map() to convert a list of strings to uppercase
  2. Use filter() to remove negative numbers from a list
  3. Sort a list of tuples based on the second value
  4. Write a recursive function to print numbers from 1 to n
  5. Modify recursion example to print numbers in reverse

Advanced Level

  1. Write a recursive function to calculate factorial
  2. Write a recursive function to calculate Fibonacci series
  3. Create a function using both lambda and map() to square a list
  4. Implement a recursive function to find sum of digits of a number
  5. Compare recursion vs loop for factorial and analyze performance

Summary

  • Lambda functions provide a concise way to write small functions
  • Higher order functions like map(), filter(), and sorted() enhance functional programming
  • Recursion is powerful but must be used carefully
  • Choosing between recursion and iteration depends on problem complexity

April Python Bootcamp Day 11

What is a Function?

A function is a reusable block of code that performs a specific task.

def greet():
print("Hello, World!")

greet()

Once defined, a function can be called multiple times:

greet()
greet()

This avoids repetition and makes your code cleaner.


 Function Syntax

def func_name(val1, val2): # parameters
# code
pass
  • def → keyword to define function
  • func_name → function name
  • val1, val2 → parameters
  • pass → placeholder

 Parameters vs Arguments

def greet(name):
print("Hello,", name)

greet("Piyush")
  • name → parameter (definition time)
  • "Piyush" → argument (calling time)

Important rule:

Number of parameters = Number of arguments (unless defaults are used)


 Functions with Return Value

def add(a, b):
return a + b

result = add(5, 3)
print(result)

Key difference:

  • print() → displays output
  • return → sends value back for reuse

 Types of Arguments

1. Positional Arguments

Order matters.

def add(b, a):
print(a)
print(b)
return a + b

add(5, 3)

Output:

3
5
8

2. Keyword Arguments

Order does not matter.

def example(name, age):
print(f"My name is {name} and my age is {age}")

example(age=30, name="Piyush")

3. Default Arguments

Used when values are not provided.

def example(name="Not Known", age="I Don't know"):
print(f"My name is {name} and my age is {age}")

example("Rafish")
example("Rahul", 45)
example()

4. Variable-Length Arguments (*args)

Used when number of inputs is unknown.

def total(*nums):
return sum(nums)

print(total(1, 2, 3, 4, 5))

5. Keyword Variable-Length Arguments (**kwargs)

Accepts multiple key-value pairs.

def details(**data):
print(data)

details(name="Piyush", age=30, phone=12345)

 Key Observations

  • Functions can accept any data type (even True, strings, etc.)
  • Flexible argument handling makes functions powerful
  • Widely used in APIs, backend systems, automation, and ML pipelines

 Assignments (Based on Today’s Concepts)

 Basic Level

  1. Create a function that prints "Hello Python"
  2. Write a function that takes a name and prints a greeting
  3. Create a function that adds two numbers and returns the result
  4. Call a function multiple times and observe output
  5. Pass different data types (int, string, boolean) to a function

 Intermediate Level

  1. Create a function using positional arguments and observe order impact
  2. Create a function and call it using keyword arguments
  3. Write a function with default parameters and test all cases
  4. Create a function using *args to find the sum of numbers
  5. Modify *args function to return maximum value

 Advanced Level

  1. Create a function using **kwargs and print all key-value pairs
  2. Build a function that accepts both *args and **kwargs
  3. Create a function that validates input before processing
  4. Write a function that returns multiple values (sum, average)
  5. Implement a mini user profile system using **kwargs

Example idea:

def profile(**data):
for key, value in data.items():
print(f"{key} : {value}")

 Summary

  • Functions make code reusable and structured
  • return is essential for real-world applications
  • Argument types provide flexibility (*args, **kwargs)
  • Understanding parameter behavior is critical for debugging

 

Popular Posts

Categories

100 Python Programs for Beginner (119) AI (256) Android (25) AngularJS (1) Api (7) Assembly Language (2) aws (30) Azure (10) BI (10) Books (262) Bootcamp (11) C (78) C# (12) C++ (83) Course (87) Coursera (300) Cybersecurity (30) data (6) Data Analysis (32) Data Analytics (22) data management (15) Data Science (355) Data Strucures (17) Deep Learning (160) Django (16) Downloads (3) edx (21) Engineering (15) Euron (30) Events (7) Excel (19) Finance (10) flask (4) flutter (1) FPL (17) Generative AI (73) Git (10) Google (51) Hadoop (3) HTML Quiz (1) HTML&CSS (48) IBM (42) IoT (3) IS (25) Java (99) Leet Code (4) Machine Learning (294) Meta (24) MICHIGAN (5) microsoft (11) Nvidia (8) Pandas (14) PHP (20) Projects (33) pytho (1) Python (1339) Python Coding Challenge (1134) Python Mathematics (1) Python Mistakes (51) Python Quiz (495) Python Tips (5) Questions (3) R (72) React (7) Scripting (3) security (4) Selenium Webdriver (4) Software (19) SQL (49) Udemy (18) UX Research (1) web application (11) Web development (8) web scraping (3)

Followers

Python Coding for Kids ( Free Demo for Everyone)