I built my first real Python project today. 🐍 A fully functional Contact Book — runs in the terminal, no frameworks, no tutorials to copy from. What it does: → ➕ Add multiple contacts at once → 📋 View all saved contacts → ❌ Delete contacts by number → 🔁 Keeps running until you choose to exit What I used to build it: → Dictionary — to store name + phone pairs → While loop — to keep the app running → Functions — to avoid repeating code → Enumerate — to number contacts cleanly 3 weeks ago I didn't know what a dictionary was. Today I built an app with one. That's what consistent learning looks like. 💪 #Python #LearningInPublic #DataAnalytics #PythonProject #BBA #buildinpublic
More Relevant Posts
-
Python scope is one of those topics that separates developers who debug fast from those who don't. The language gives you no warning when a variable resolves to an unexpected value. It simply executes, returns a result, and moves on. Tracking down the source of that behaviour - without a solid mental model of how Python resolves names - can cost hours. The LEGB rule isn't complicated. But it's rarely taught with the depth it deserves. I wrote a free guide to change that: → How Python's name resolution actually works under the hood → The LEGB lookup chain with concrete, practical examples → Enclosing scopes and closure behaviour explained clearly → When global and nonlocal are appropriate - and when they signal a design problem → The scope patterns most likely to introduce silent bugs in real codebases Download it free: https://lnkd.in/djp6HJdD #Python #SoftwareEngineering #PythonDevelopment #BackendDevelopment
To view or add a comment, sign in
-
Day 5 of my Python learning journey — diving deeper into OOP Today I implemented two core classes: BankAccount and InventoryItem, with a focus on clean design and proper encapsulation. A key takeaway: Validate first, then modify state — never the other way around. I also caught a few common pitfalls early: • Exposing internal attributes directly • Performing validation after state changes • Duplicating logic across methods This exercise reinforced an important principle: a well-designed class should be self-protecting. External code should interact with it safely through defined interfaces, without risking inconsistent state. Feeling more confident with structuring real-world logic using classes and applying these concepts in API design with FastAPI. GitHub Repository: https://lnkd.in/dqBZtfpM #Python #OOP #FastAPI #SoftwareEngineering #CleanCode #LearningInPublic
To view or add a comment, sign in
-
-
The moment you add a new condition to an if/else chain in your pipeline, you’ve modified existing code! That’s exactly the smell OCP is meant to catch. 🔍 Open for extension, closed for modification means adding new behavior by writing new code, not patching old one! In my latest article, I break down what OCP looks like in Python data projects: strategy patterns, abstract base classes, and the tradeoffs of when the extra structure is actually worth it. https://lnkd.in/eE9yicvC This is Part 2 of my SOLID series. What’s the most painful “just add another elif” you’ve ever had to maintain? 😅 #Python #SoftwareEngineering #SOLID #DataScience #CleanCode
To view or add a comment, sign in
-
Day 17 of my Python Full Stack journey. ✅ Today's topic: The 3 types of methods in OOP. Most beginners only know one. Here's all three explained simply. Here's what I typed today: class Student: school = "Acharya Institute" # class variable def __init__(self, name, marks): self.name = name # instance variable self.marks = marks # Instance method — works with one object def result(self): return f"{self.name}: {'Pass' if self.marks >= 50 else 'Fail'}" # Class method — works with the class itself @classmethod def school_name(cls): return f"School: {cls.school}" # Static method — independent, no self or cls @staticmethod def passing_marks(): return "Passing marks: 50" s1 = Student("Punith", 88) print(s1.result()) # instance method print(Student.school_name()) # class method print(Student.passing_marks()) # static method Simple rule: → Instance method — needs object data (use self) → Class method — needs class data (use cls) → Static method — needs neither. Just a helper function. Did you know all 3 types of methods before reading this? #PythonFullStack #Day17 #OOP #BuildingInPublic #100DaysOfCode #Bangalore
To view or add a comment, sign in
-
-
Day 2 of #30DaysOfPython ✅ Today's lesson: Python doesn't care how you label things — until it does. I spent today learning variables and data types. Sounds basic. It is basic. But here's what I didn't expect — Python's dynamic typing actually confused me at first. In theory, I knew that x = 5 and x = "five" are both valid. In practice, I accidentally added a string to an integer and got a TypeError I didn't understand for 10 whole minutes. The bug? I was reading user input and forgetting that input() always returns a string. So my "sum" was just two numbers glued together like "510" instead of 15. 🤦 What clicked today: • int, float, str, bool — the four I'll use constantly • type() is your best friend when debugging • Python is forgiving… until you mix types Lesson of the day: Read your error messages. The answer is usually right there. Resources I used: Python.org official docs + a great freeCodeCamp YouTube video. Day 2 done. The bugs are starting early — right on schedule. 😅 👇 What's the sneakiest beginner Python bug you ever ran into? Tell me so I can be prepared! #Python #30DaysOfPython #DataTypes #CodingJourney #TechLearning
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
-
54/75 Today I spent some time learning about asynchronous programming in Python and honestly, it changed how I think about performance. Instead of waiting for one task to finish before starting another, async lets your code handle multiple things at once. It’s especially powerful for I/O-heavy tasks like API calls, database queries, or web scraping. What stood out to me: • Faster execution without adding more hardware • Cleaner handling of concurrent operations • The power of async and await when used correctly It’s one of those concepts that feels confusing at first, but once it clicks, you start seeing so many real-world use cases. Still experimenting with it but definitely a step forward in writing more efficient systems 🚀 #Python #AsyncProgramming #LearningInPublic #SoftwareDevelopment
To view or add a comment, sign in
-
-
🚀 Day 18 – Flatten a Nested List (Python) 💻 Today’s task: Write a function to flatten a nested list. 🔍 A nested list contains elements that can be lists within lists. The goal is to convert it into a single, flat list. 📌 This exercise helped me understand: • Recursion concepts 🔁 • List traversal techniques 🧩 • Writing flexible and reusable functions ⚙️ ✨ A great problem to improve logical thinking and handle complex data structures. 📈 Learning step by step and staying consistent. #Python #100DaysOfCode #CodingJourney #Programming #ProblemSolving #Developer #LearnToCode #Tech #PythonTips #DataStructures
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
-
Most developers waste hours on bad code. All because they skip one simple thing. 🔥 How Python Functions Work 👇 Stage 1: Plan ──▶ Pick a task ──▶ Name your function Stage 2: Write ──▶ Use def keyword ──▶ Add your logic Stage 3: Input ──▶ Pass your values ──▶ Set parameters Stage 4: Run ──▶ Call the function ──▶ See the output Stage 5: Reuse ──▶ Call it again ──▶ Save more time Functions keep your code clean. They save time. They make fixing bugs easy. Write once. Use many times. That is the real power of Python. 💡 Have you written your first Python function yet? Drop a YES or NO below 👇 #Python #PythonBasics #LearnPython #CodingForBeginners
To view or add a comment, sign in
Explore related topics
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