Thinking in Blueprints (Classes & Constructors) Focus: Introduction to OOP and the __init__ method. Day 9(06-04-2026): Today, my perspective on coding shifted. I moved away from just writing "steps" and started thinking in Objects. In Python, everything can be modeled after the real world using Classes. The big breakthrough today: Classes vs. Objects: A Class is the blueprint (like a drawing of a car), and the Object is the actual thing (the car you can drive). The Constructor (__init__): I learned how to use the "dunder init" method to give my objects their initial data the moment they are created. The self Keyword It’s a bit more abstract than what I’ve done before, but it makes the code so much more organized and powerful. #OOP #PythonProgramming #Day9 #ObjectOriented #CodingConcepts
More Relevant Posts
-
Week 3 of #100DaysOfCode — done! 🎉 This week I started thinking in objects. Topics covered: 🧱 Classes & Objects → What OOP actually is (and why it matters) → Classes, instances, attributes, methods → public, _protected, and __private attributes → __init__, self, and how Python works under the hood 🔒 Properties → @property — the Pythonic way to write getters & setters → No more get_age() / set_age() — just person.age ✅ ⚙️ More Classes → __str__ vs __repr__ — and why both matter → Class attributes vs instance attributes → @classmethod and @staticmethod → __dict__, getattr, dynamic attributes I’ve structured my learning into notes and practical examples to better understand the concepts : https://lnkd.in/epaBymnJ 21 days down. 79 to go. 💻 #100DaysOfCode #Python #LearningInPublic #Programming
To view or add a comment, sign in
-
Today’s Python topic felt like the point where code stops being one-time work and starts becoming reusable. 🐍 Day 11 of my #30DaysOfPython journey was all about the basics of function, and this one was a big reminder that good code is not just about writing more — it is about writing smarter. A function is a reusable block of code designed to do a specific task, and in Python, we define it using the def keyword. Today I explored: 1. How functions are created and called 2. How return sends values back from a function and return None when nothing is returned 3. Passing parameters and arguments 4. Passing arguments using key-value style 5. Default parameters 6. Arbitrary arguments with *args 7. Arbitrary named arguments with **kwargs What stood out to me today was how functions make code feel organized, reusable, and much easier to scale. Instead of repeating the same logic again and again, you write it once and use it wherever needed. One more day, one more topic, one more step toward writing code that is cleaner, smarter, and actually built to last. Github Link - https://lnkd.in/gUhhaW_y #Python #LearnPython #CodingJourney #30DaysOfPython #Programming #DeveloperJourney
To view or add a comment, sign in
-
I’ve put together a quick reference guide covering essential Python Dictionary and Set methods! 🐍 Whether you are just starting out with Python or need a quick refresher, this document walks through everything from basic dictionary operations like .get() and .update(), to mathematical set operations like .intersection() and .symmetric_difference(). It includes brief explanations and simple code snippets for each method to help you write cleaner, more efficient code. Check out the document below, and let me know your favorite or most-used method in the comments! 👇 #Python #Programming #Coding #DataStructures #PythonDeveloper #Cheatsheet
To view or add a comment, sign in
-
🚀Day 66 | Lambda Functions & Functional Programming Today I practiced Python lambda functions and their real-time usage - What I Worked On: •Created lambda function to find square of a number •Used lambda with sum() to calculate total of list elements •Applied sorted() with lambda to sort tuples based on index •Used math.sqrt() with lambda for square root calculation •Built lambda for adding two numbers 💡Key Learning: - Lambda functions help write short and clean code - Useful for one-line operations and quick logic - Powerful when combined with functions like sorted(), map() 👉🏻Small concepts like lambda can make code more efficient and readable Consistency is turning basics into strength #Day66 #Python #LambdaFunctions #FunctionalProgramming #ProblemSolving #CodingJourney #10000Coders #PythonDeveloper
To view or add a comment, sign in
-
🎉 LaTeX expressions written easily from Python using Latexify library. pip install latexify_py Decorators: - @latexify.expression - @latexify.algorithmic 🍀 Check out Khuyen Tran’s blog post on how to write LaTeX using Latexify, Sympy and regular IPython: https://lnkd.in/gCtsnSDS #bookmark #python #latex #pylib #latexify #tipsandtricks
Have you ever needed to add a math description for your Python function but found it time-consuming? Non-programmers cannot easily read Python logic. However, manually converting it to LaTeX is slow and quickly becomes outdated as the code changes. latexify_py solves this with a single decorator, generating LaTeX directly from your function so the math stays readable and always in sync with the code. Key capabilities: • Three decorators for different outputs: expressions, full equations, or pseudocode • Displays rendered LaTeX directly in Jupyter cells • Functions still work normally when called Plus, latexify_py is open source! Install it with "pip install latexify-py". 🚀 Article on 3 tools that convert Python code to LaTeX: https://bit.ly/4dS4gOB ☕️ Run this code: https://bit.ly/4bW2ycE #Python #LaTeX #DataScience
To view or add a comment, sign in
-
-
🚀 Master Python: From Zero to Expert Want to learn Python but don’t know where to start? This definitive visual guide breaks down everything you need to know into a vibrant, organized mind map. From the basics and Object-Oriented Programming (OOP) to powerful data science libraries and web development frameworks. This guide is designed to keep you on track as you grow as a programmer. Save this post to refer back to whenever you need to recall a key concept or essential tool. The Python ecosystem is vast, but with the right roadmap, the sky’s the limit! 🐍💻 #PythonProgramming #DataScience #CodeNewbie #Programming #SoftwareDevelopment
To view or add a comment, sign in
-
-
🚀Day 65 | Lambda Functions & Functional Programming Today I practiced Python lambda functions and their real-time usage - What I Worked On: •Created lambda function to find square of a number •Used lambda with sum() to calculate total of list elements •Applied sorted() with lambda to sort tuples based on index •Used math.sqrt() with lambda for square root calculation •Built lambda for adding two numbers 💡Key Learning: •Lambda functions help write short and clean code •Useful for one-line operations and quick logic •Powerful when combined with functions like sorted(), map() 👉🏻Small concepts like lambda can make code more efficient and readable Consistency is turning basics into strength #Day65 #Python #LambdaFunctions #FunctionalProgramming #ProblemSolving #CodingJourney #10000Coders #PythonDeveloper #SravanKumarSir
To view or add a comment, sign in
-
Today’s Python lesson was a quiet reminder that time is one of the most useful things code can help us handle. 🐍 Day 16 of my #30DaysOfPython journey was all about date and time. Python’s date and time module helps us work with: 1. current date and time 2. formatted date strings 3. converting strings into datetime objects 4. time objects 5. time differences and time spans A few things I explored today: 1. dir() and help() to check what a module offers 2. datetime.now() for current date, time, and timestamp 3. strftime() for formatting dates and time 4. strptime() for converting string dates into datetime objects 5. date() to get only day, month, and year 6. subtraction to find the difference between two time points 7. timedelta() to work with time intervals What stood out to me today was how Python does not just store time — it helps you shape it, compare it, and format it in ways that actually make sense for real projects. One more day, one more topic, one more layer of Python making everyday things easier to manage. Github Link - https://lnkd.in/gMy-QseU #Python #LearnPython #CodingJourney #30DaysOfPython #Programming #DeveloperJourney
To view or add a comment, sign in
-
Today’s Python lesson made the whole language feel more connected. 🐍 Day 12 of my #30DaysOfPython journey was all about modules, and this one felt like learning how Python organizes its tools behind the scenes. A module is basically a file that contains code, functions, or variables that you can reuse in another file. Instead of writing everything from scratch, you can create something once and bring it into your main program whenever needed. Today I explored: 1. What modules are and why they matter 2. Creating a separate file and importing it into another file 3. Importing only specific parts instead of the whole file 4. Renaming something while importing it 5. Built-in modules like os, statistics, math, string, and random What stood out to me today was how modules make Python feel less like a single script and more like a system of connected pieces. That shift matters because it is what makes code easier to reuse, organize, and scale. One more day, one more topic, one more step toward writing code that is cleaner, smarter, and more modular. Which felt more useful to you first: creating your own module or using built-in ones like math and os? Github Link - https://lnkd.in/gVPWQWiS #Python #LearnPython #CodingJourney #30DaysOfPython #Programming #DeveloperJourney
To view or add a comment, sign in
-
Today’s Python lesson felt like the moment code stopped being just instructions and started feeling reusable, flexible, and kind of smart. 🐍 Day 14 of my #30DaysOfPython journey was all about higher order functions, and this one made Python feel a lot more powerful. In Python, functions are first-class citizens, which means they can: 1. take other functions as parameters 2. return functions as results 3. be modified 4. be assigned to variables Today I also explored: 1. Functions as parameters 2. Functions as return values 3. Closures — where an inner function can use the outer function’s scope 4. Decorators — a clean way to add extra behavior without changing the original function 5. Built-in higher order functions like: i. map() → transforms items ii. filter() → keeps only matching items iii. reduce() → combines items into one value What stood out to me today was how Python lets functions do more than one job. They are not just blocks of code anymore — they can actually shape how other code behaves. One more day, one more topic, one more step toward thinking in cleaner, more reusable logic. Which one feels the most interesting to you right now: map(), filter(), reduce(), or decorators? Github Link - https://lnkd.in/gc-mj8Qi #Python #LearnPython #CodingJourney #30DaysOfPython #Programming #DeveloperJourney
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development