Python Study Plan -
WEEK 1: Python Fundamentals Question Bank
Core Concepts & Practice
What is the difference between input() and print()? Write a code that takes your name and prints a greeting.
Create a program that converts temperature from Celsius to Fahrenheit.
Demonstrate usage of all types of operators: arithmetic, logical, comparison, assignment, bitwise.
Write a script that swaps two variables without using a third variable.
Use type(), id(), isinstance() on different variables.
Show string slicing with negative indices. Reverse a string.
Write code to count vowels in a sentence using a loop.
Use split(), strip(), lower(), upper(), replace(), find(), startswith(), and endswith() on a sample string.
Built-in Function Practice
Practice with: len(), max(), min(), sum(), sorted(), reversed(), enumerate(), zip(), chr(), ord(), round()
WEEK 2: Intermediate + OOP Basics Question Bank
Data Structures & File Handling
Create a dictionary of students and their marks. Print average marks.
Sort a list of tuples based on the second item in each tuple.
Write a program to read a CSV file of names and scores and output the top scorer.
Handle exceptions for division by zero and invalid inputs.
Practice: open(), read(), readlines(), write(), with, close() in file operations.
Functions + OOP Basics
Write a function to check if a number is prime.
Write a program with a reusable function to find factorial, and use lambda, map(), filter(), reduce() to operate on a list.
Build a class Person with name and age attributes. Add a method introduce() that prints a sentence.
Use __init__() constructor to initialize a class, demonstrate attribute access and modification.
Built-in Function Practice
Practice with: any(), all(), abs(), divmod(), pow(), range(), help(), dir()
WEEK 3: OOP Mastery & Real-World Thinking
OOP Deep Concepts
Create a base class Animal and derived classes Dog and Cat. Use inheritance.
Implement method overriding using the same method name in child class.
Demonstrate polymorphism using a function that accepts multiple object types.
Create a class Employee that keeps count of all employees created (use class variable).
Build a BankAccount class with encapsulation (_balance, getter/setter using @property).
Design Thinking
Given a messy class design, refactor it to follow Single Responsibility Principle.
Compare and contrast composition vs inheritance with a code example of Library, Book, and Member.
Use isinstance() and issubclass() to check OOP hierarchies.
Practice Abstract Classes
Use ABC module: Create an abstract class Shape with method area() and implement in Circle, Square.
WEEK 4: Projects + Real-World Integration
Advanced Practice
Build a mini CLI app: Contact Manager using class & file storage.
Write a program to fetch weather info using a public API and parse the JSON data.
Create a Todo GUI using tkinter with add, delete, and complete functions.
Push a project to GitHub and explain each line in your README.md.
Capstone Challenge Ideas
Student Report Card System (file + OOP)
Expense Tracker (CSV + OOP)
Quiz App (random questions + scoring + file storage)
News Aggregator (API + classes + data parsing)
Full Built-in Function Integration
Use these in your weekly challenges and projects:
input(), print(), type(), isinstance()
abs(), pow(), round(), sum(), min(), max()
enumerate(), zip(), map(), filter(), reduce()
sorted(), reversed(), len(), range(), divmod()
chr(), ord(), id(), eval(), exec(), globals(), locals()
Comments
Post a Comment