Python Files Lets play with files with statement in python Refer Here for changes done in inventory Exercise: Rightnow the program reads the inventory.csv and forces you to add an item I have added four todos. Try exploring a new syntax added called match for taking user inputs Explore what is CSV, Json, YAML
Gen-AI Developer Classroom notes 17/Mar/2025
Python Standard Library Exception Handling Refer Here for python errors and exceptions Python Exception Class Hierarchy It revolves try, except and finally block Class Hierarchy Custom Exceptions Refer Here for the article File Handling in Python We have two types of files text files binary files Refer Here for the article To add persistence to… Continue reading Gen-AI Developer Classroom notes 17/Mar/2025
Gen-AI Developer Classroom notes 17/Mar/2025
Python Standard Library Exception Handling Refer Here for python errors and exceptions Python Exception Class Hierarchy It revolves try, except and finally block Class Hierarchy Custom Exceptions Refer Here for the article File Handling in Python We have two types of files text files binary files Refer Here for the article To add persistence to… Continue reading Gen-AI Developer Classroom notes 17/Mar/2025
Gen-AI Developer Classroom notes 16/Mar/2025
Dictionary Comprehensions Refer Here for an article on dictionary comprehensions syntax: dictionary = {key: value for vars in iterable} Refer Here for the samples done in the class Anonymous functions: Lambda Lambda Map, Filter and Reduce functions in python Refer Here for some of the samples Python Standard Library Refer Here for official docs. Refer… Continue reading Gen-AI Developer Classroom notes 16/Mar/2025
Gen-AI Developer Classroom notes 15/Mar/2025
Regular Expressions for Text Searching Refer Here for the Programiz Docs and also Refer Here to This article for Tables with meanings of meta characters Find regular expressions for email id url domain name us phone numbers indian phone numbers Python re methods Here is a table summarizing the key methods of the re module… Continue reading Gen-AI Developer Classroom notes 15/Mar/2025
Gen-AI Developer Classroom notes 13/Mar/2025
Method types in classes Classes have three types of methods instance methods: These can modify instance variables (self.age = age). They generally have self has first argument class methods: These can modify class variables. class variables are shared across all instances. static methods: These methods have nothing to do with class or instance methods or… Continue reading Gen-AI Developer Classroom notes 13/Mar/2025
Gen-AI Developer Classroom notes 12/Mar/2025
Duck Typing in Python Duck typing is based on the idea that if something looks, swims, and quacks like a duck, then it’s probably a duck. Traditional approach Abstract classes in Python Refer Here Protocol removes the need for explicit inheritance and gives interface like functionality Type Hinting Refer Here for types
Gen-AI Developer Classroom notes 11/Mar/2025
Composition This represents has a relationship Lets define composition with the following structure Refer Here for the sample Exercise
Gen-AI Developer Classroom notes 09/Mar/2025
Inheritence Watch classroom recording where we start for design a class to create bus booking and inheritence helped in scaling this to any booking. Refer Here for inheritence example Refer Here for inheritence examples Refer Here for inheritence example done in the class. In python we have a class called as object which is base… Continue reading Gen-AI Developer Classroom notes 09/Mar/2025
Gen-AI Developer Classroom notes 08/Mar/2025
Object Oriented Programming Refer Here for an article on OOP from Real python. We are asked to build a software for online bus ticket booking system Requirements Gathered with the help of Gemini Absolutely! Here’s a breakdown of requirements for building an online bus ticket booking system that operates exclusively within a web browser: I.… Continue reading Gen-AI Developer Classroom notes 08/Mar/2025
Gen-AI Developer Classroom notes 06/Mar/2025
Virtual environment Assumption: We are asked to work on a fastapi project to run the ml models. This project requires fast api, pytorch and hugging face What we would acheive creating virtual environment writing a python module creating a jupyter notebook with virtual environment Steps Create a new folder Now execute the following command #… Continue reading Gen-AI Developer Classroom notes 06/Mar/2025
Gen-AI Developer Classroom notes 05/Mar/2025
Module Module in python is a file i.e. every .py file is a module Module consits of variables methods classes Modules can be used in two ways executable library Refer Here from Programiz :imp: Dunder in python dunder (double underscore) around anything in python has a special meaning predefined dunder methods or members are also… Continue reading Gen-AI Developer Classroom notes 05/Mar/2025
Gen-AI Developer Classroom notes 04/Mar/2025
Mapping Data types Dictionary is a mapping data type which is composed of key and value Set This is unique collection of values Refer Here for basic of set and dictionary Function Lets identify the need for functions by solving problem 3 Refer Here for programiz functions Refer Here for the function samples
Gen-AI Developer Classroom notes 27/Feb/2025
Sequence Data types in Python str: This is sequence of character list: this is sequence of objects which can be altered tuple: this is sequence of objects which cannot be altered range: this is generally a numerical sequence indexing and slicing on sequences Indexes in python Slicing in python: For all sequence types we can… Continue reading Gen-AI Developer Classroom notes 27/Feb/2025
Gen-AI Developer Classroom notes 26/Feb/2025
Flow Control contd looping constructs while: Refer Here for: Refer Here Refer Here for basic looping constructs The id() function in Python returns a unique identifier for the object passed to it. This identifier is essentially the memory address of the object in the CPython implementation, which is the most commonly used Python interpreter. The… Continue reading Gen-AI Developer Classroom notes 26/Feb/2025
Gen-AI Developer Classroom notes 25/Feb/2025
Python Python is dynamically typed language Python language has standard library which is referred as batteries included This standard library has lots of functions, functionalities which we can readily use. I would be referring them as builtins Some of them which we are going to use are print type id To demonstrate multiple functionalities, i… Continue reading Gen-AI Developer Classroom notes 25/Feb/2025
Gen-AI Developer Classroom notes 24/Feb/2025
Debugging Copy the code Refer Here and create a new file test_program.py in folder open the folder in visual studio code Ensure python extension is installed Put a breakpoint (on line 42) and Run python debug We can have multiple break points, Variable values are shown in variables section and call stack shows the sequence… Continue reading Gen-AI Developer Classroom notes 24/Feb/2025
Gen-AI Developer Classroom notes 23/Feb/2025
Project euler 9 Brute force: Check all the possibilities General sites/books to research about python First preference Real Python I would suggest Programiz Geek for Geeks W3schools Books: Think Python Python in a nutshell Head First Python Learn Python Python Python is a dynamically typed language i.e. you need not specify types while writing code… Continue reading Gen-AI Developer Classroom notes 23/Feb/2025
Gen-AI Developer Classroom notes 22/Feb/2025
Project euler Problems Operators Assignment # Assigning memory location to a variable a = 5 Arthimetic + – * // (integer division quotient) % (modulus remainder) / (division) Equality == (equals) != (not equals) Logical and or not Comparision < <= > >= Problem 1 Problem statement memory locations result = 0 limit = 10… Continue reading Gen-AI Developer Classroom notes 22/Feb/2025
Gen-AI Developer Classroom notes 20/Feb/2025
Flow Control Program is statements to be executed in an order Flow control is all about controlling the sequence we will skip certain lines or execute certain lines multiple times We have two types conditional statements: They help in skipping statements popular: if (if else, if elseif, ) switch/case looping constructs: The help in executing… Continue reading Gen-AI Developer Classroom notes 20/Feb/2025
