Day 02 of learning Python & OOP I thought I understood encapsulation. Then one line proved me wrong. acc.__balance = 0 Looks like it breaks encapsulation, right? It doesn't. It does something worse. It creates a new attribute. A ghost one. Silently. That moment changed how I see Python. Details in the slides 👇 Have you ever trusted something that "looked right"… but wasn't? #Python #OOP #LearningInPublic #SoftwareEngineering
Iman Sorati Ashtiani’s Post
More Relevant Posts
-
Python Tip of the Day 🐍 Choosing the right file mode in Python is more important than it seems. w and w+ may look similar, but they serve different purposes: w → Write only w+ → Write + Read Both modes create the file if it doesn’t exist and overwrite existing data, which makes them powerful—but also risky if used carelessly. Day 43 of building Python basics #Python #FileHandling #LearnPython #ProgrammingBasics #PythonTips
To view or add a comment, sign in
-
-
Struggled to understand Python OOP… until I practiced it daily 👇 Recently, I learned about: ✔️ Classes and Objects ✔️ init method ✔️ Static & Class methods I also built a small Employee system to understand these concepts better. 💡 My learning: Practice > Theory If you're learning Python, don’t just watch tutorials — build something! What are you currently learning in Python? #Python #OOP #CodingJourney #Learning
To view or add a comment, sign in
-
🚀 Day 2/30 – Python Challenge Continuing my Python journey! 🐍 🔹 Key Concepts: * Different data types in Python * Integer, Float, String, Boolean * Storing values using variables 💻 Mini Task: Created variables of different data types and printed them to understand how Python handles each type. 🎯 Learning Outcome: Learned how Python supports multiple data types and how to use them effectively in programs. Step by step getting more comfortable with coding! 💻✨ #Python #CodingChallenge #LearningJourney #AI #StudentDeveloper #Day2
To view or add a comment, sign in
-
-
*# Day 34 of my Python Learning Journey* 🐍 Today: *Abstract Classes* in Python They’re blueprints, not objects. You can’t create them directly. Their job? Force child classes to follow rules. `Shape` says every child MUST have `area()`. `Car`, `Circle` must obey. No skipping. Code with structure = code that scales. #Python #100DaysOfCode #OOP #AbstractClass #CodingJourney
To view or add a comment, sign in
-
-
Python Tip of the Day 🐍 Understanding file modes is essential before working with files in Python. The difference between r and r+ may look small, but it changes how your program behaves. r → Read-only (file must exist) r+ → Read & write (no file creation) Day 42 of building Python basics #Python #FileHandling #LearnPython #ProgrammingBasics #PythonTips
To view or add a comment, sign in
-
-
(DAY - 8) 🚀 Understanding String Operators in Python If you're starting your journey in Python, mastering string operators is essential! In this post, I’ve explained how we can use operators like +, *, in, and not in to manipulate and work with text efficiently. From combining strings to checking data presence, these operators play a key role in writing clean and powerful Python code. 🧑💻 💡 Save this post for quick revision and share it with others who are learning Python! #Python #Coding #DataAnalytics #ProgrammingBasics #LearnPython #TechLearning #CodingJourney
To view or add a comment, sign in
-
-
This Simple Python Code Turns Marks into a Graph In this video, I created a simple graph of student marks using Python. I used the matplotlib library to plot the data and visualize it in an easy way. It helps to understand the marks better instead of just looking at numbers. I’m learning how to turn data into visuals step by step. More projects coming soon. #Python #Matplotlib #DataVisualization #Coding #Learning
To view or add a comment, sign in
-
Built a simple Dice Roller using Python. As part of practicing Python basics, I created a small program that simulates rolling a dice. This program: • Generates a random number between 1 and 6 • Allows the user to roll multiple times • Uses loops and user input for interaction Through this project, I practiced: • Random module • Loops • Conditional statements • Handling user input It’s a simple project, but it helped me understand how randomness and control flow work together. Still learning and building step by step. #Python #BeginnerProject #DiceRoller #LearningInPublic #CodingJourney
To view or add a comment, sign in
-
-
Python Clarity Series – Episode 22 Topic: == None vs is None 📌 Checking None the wrong way: if x == None: Works… but not recommended. 👉 Correct way: if x is None: 💡 Why? None is a singleton object 👉 is checks identity (correct here) 👉 == checks value 💡 Rule: Use is None, not == None This is considered best practice in Python. Small detail → Strong coding habit #PythonBestPractices #CleanCode #DeveloperThinking #python #clarityseries
To view or add a comment, sign in
-
-
Learn how to safely handle missing files in Python. When you try to open a file that does not exist in read mode, Python raises a FileNotFoundError. In this quick tutorial, you will see how to use a try except block to catch the error, create the file automatically, and keep your program running smoothly. This is perfect for beginners and real world applications like logs, configuration files, and user data. Master file handling in Python in under 90 seconds. #python #shorts #pythonerror #FileNotFoundError #exceptionhandling #tryexcept #filehandling #pythontutorial #learnpython #codingforbeginners #errorhandling #programmingtips #pythonprogramming #automation #codingshorts #fyp #viral #softwaredevelopment #pythonbasics #debugging
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