🐍 Day 8 of Learning Python — and things are getting real! Today's lab was all about writing code that doesn't break (or at least fails gracefully 😄). Here's what I worked through: ✅ Exception Handling — try / except / else / finally • Caught ZeroDivisionError, FileNotFoundError, ValueError, and TypeError • Used `raise` to throw custom error messages • Built my own exception class: TooSmallError 🎉 ✅ Standard library deep dive: • math — calculated circle areas, factorials, GCD, and compound interest • random — shuffled lists, simulated 1000 coin flips, generated reproducible sequences with seed() • datetime — parsed date strings, added time deltas, sorted ISO dates, and printed 5-day schedules ✅ Introspection with dir() and help() The biggest lesson today? Real-life programs don't always get perfect input. Learning to handle errors gracefully is just as important as writing the happy path. Day by day, the pieces are coming together. 💪 #Python #100DaysOfCode #LearningToCode #PythonProgramming #CodingJourney #Day8
Day 8 of Learning Python: Exception Handling and Standard Library
More Relevant Posts
-
Week 4 of #100DaysOfCode — done! 🎉 Last week I learned how to build classes. This week I learned how to make them talk to each other. Topics covered: 🧹 Inheritance → Superclass, subclass, base class — and what they actually mean → How Python finds attributes (spoiler: it walks up the chain) → Overriding methods — and extending them with super() → isinstance, issubclass, type — when to use which → Multiple inheritance + MRO (Method Resolution Order) 🏗️ Abstract Classes & Interfaces → ABC + @abstractmethod — enforcing a contract on subclasses → Duck typing — "if it has a speak() method, it speaks" → Subclassing built-ins (list, dict, iterator) → Mixins — plugging in behaviour without full inheritance I’ve structured my learning into notes and practical examples to better understand the concepts : https://lnkd.in/epaBymnJ #100DaysOfCode #Python #OOP #LearningInPublic #Programming
To view or add a comment, sign in
-
Stuck in tutorial hell? 🐍 The best way to actually master #Python is to build #projects that challenge your current level. Here are 12 #project ideas to help you level up: 🟢 #Easy: Focus on logic and basic syntax with a URL Shortener or a CLI Utility. 🟡 #Mid: Build real-world logic with a Weather App or a Blog Application. 🔴 #Pro: Dive into advanced tech like Image Recognition or AI Chatbots. Best practice? Don't just follow a tutorial add one custom feature of your own to make it unique! 💡 💾 Save this roadmap for your next coding session! 👇 Comment which project you’re going to build next. Follow for more Python & Data Science tips 🚀 #Python #Coding #DataScience #ProjectIdeas #Programming #PythonLearning #TechCareer
To view or add a comment, sign in
-
-
💭 Day 6 with Python… it finally felt useful. Until now, I was learning concepts… Conditions, loops, functions… all great. But today, something changed. 👉 I learned about lists. At first, it looked simple: A collection of values in one place. But then I realized… This is how real-world data is handled. Names. Numbers. Marks. Tasks. Everything can be stored, accessed, and managed easily. 💡 Instead of writing separate variables like: name1, name2, name3… I could simply do: 👉 names = ["A", "B", "C"] Cleaner. Smarter. Scalable. So I tried something small 👇 🚀 Mini use-case: I created a list of numbers ✔ Found the largest number ✔ Calculated the sum ✔ Even filtered values And suddenly… It didn’t feel like practice anymore. It felt like solving real problems. 🐍 That’s when it clicked: Python isn’t just for coding exercises… It’s for handling real data in real situations. ✨ From concepts → to practical thinking This journey is slowly becoming meaningful. #Python #CodingJourney #Day6 #Lists #DataHandling #LearnToCode #ProgrammingLife #TechSkills #Growth 🚀
To view or add a comment, sign in
-
🚀 Just started diving into Learn Python the Hard Way by Zed A. Shaw—and it’s already reshaping how I approach coding. What I love is the structured, exercise-driven learning style—from basics like variables and loops to real-world concepts like APIs, data handling, and even SQL. It’s not just about reading, but doing consistently. Sometimes the “hard way” is actually the smartest way to build strong fundamentals. 💡 Are you learning Python the easy way… or the right way? #Python #Learning #DataScience #Programming #100DaysOfCode
To view or add a comment, sign in
-
Most of the code I’ve written works. That doesn’t mean it’s good. I won a book at a recent Python x Data Science taster session hosted by SkillStruct University and it’s already shifted how I think. Powerful Python: Patterns and Strategies with Modern Python introduces a different way of approaching code. It’s not about if the code runs, but rather thinking about structure and efficiency. I’ve only just started it, but one concept that stood out is generator functions. At first, I saw it as a useful shortcut to create iterators. But it’s more than that. Instead of building and storing everything upfront, you generate values only when needed. A small shift. But it completely changes how you think about performance. Especially when working with larger datasets. It made me realise how often I focus on getting something to work… rather than thinking about how it should be built. Still early into the book but definitely something I want to explore and apply in my projects. What’s a concept that changed how you approach learning? Thanks to Michael Olatokun for the book. #Python #DataScience #Programming #SoftwareDevelopment #LearningInPublic #TechCareers #CodingJourney
To view or add a comment, sign in
-
-
Hi guys, I know it’s delayed—now let’s dig into Python again for this post! 💭 Day 3 with Python… something finally clicked. The errors didn’t stop. The confusion didn’t magically disappear. But today… I wrote something that actually worked. Not just print("Hello, World!") Not just fixing errors… 👉 I made decisions in my code. Using if...else, my program could finally think (at least a little 😄) “IF this happens → do this” “ELSE → do something else” And suddenly, coding didn’t feel like typing… It felt like logic coming to life. 💡 That’s when I realized: Programming isn’t about memorizing syntax. It’s about teaching a machine how to think step by step. Every small concept—conditions, loops, functions— They’re not just topics… They’re building blocks of something bigger. Today it’s simple decisions. Tomorrow? Maybe something powerful. ✨ Step by step… line by line… growth is happening. #Python #CodingJourney #Day3 #LearnToCode #Programming #DeveloperLife #LogicBuilding #TechGrowth 🚀
To view or add a comment, sign in
-
🚀 Today’s Learning: Python Conditional Statements (if, elif, nested if) 🧠🐍 Today in class, I learned how decision-making works in Python using if, elif, and nested if statements. 🔹 Key Takeaways: ✔️ if-else → Used when there are two possible outcomes (True / False) ✔️ if-elif-else → Used when checking multiple conditions (order matters ⚠️) ✔️ nested if → Used for multi-level decision making (filter → then decide) ✔️ Writing clean and optimized code is as important as writing working code 💡 One important lesson: 👉 “Code running ≠ Code correct” 👉 Logic and optimization make a real difference in programming 🔧 Also learned about common mistakes like: ❌ Wrong condition order ❌ Indentation errors ❌ Repeating unnecessary code 📌 Practiced real examples like: Marks grading system Discount calculation Finding largest number Even/Odd check with proper logic This session helped me understand how to think logically while coding, not just write code. #Python #LearningJourney #DataScience #Programming #CodingBasics #IfElse #LogicBuilding #StudentLife
To view or add a comment, sign in
-
-
Not every valuable lesson comes from a complex project. 🍦 In college, I built a Python program to help a local ice cream shop calculate their weekly ice cream sales volume — based on cone sizes sold per day. The real challenge wasn't the code. It was the planning: → Define the output → Identify the inputs → Map the process → Write pseudocode → Desk-check before running anything Plan first. Code second. That mindset is something I carry into every IT problem I solve today. #Python #Coding #ITCareer #ProblemSolving #CollegeLearning #TechSkills
To view or add a comment, sign in
-
📅 Day 3 of My Learning Challenge Today, I learned about one of the most important concepts in Python programming — Functions. Functions help us write cleaner, reusable, and more organized code. Instead of repeating the same code multiple times, we can define it once and use it whenever needed. Here are a few key things I learned: 🔹 How to define a function using def 🔹 How to pass inputs (parameters) into a function 🔹 How to return results using return 🔹 The difference between built-in functions and user-defined functions For example, instead of writing the same logic repeatedly, I can do this: def greet(name): return "Hello " + name print(greet("Nasiff")) This simple concept makes code more efficient and easier to understand. One key takeaway for me today: 👉 Functions make your code smarter, not longer. I’m starting to see how these small concepts will play a big role as I go deeper into Machine Learning. 🚀 On to Day 4! #M4aceLearningChallenge #M4ace #Day3 #Python #MachineLearning #AI #CodingJourney #LearnInPublic #TechGrowth
To view or add a comment, sign in
-
-
🚀 Day 3: From Learning Concepts to Building Something Today’s learning was not just about understanding concepts — I also tried applying them by building a small project. ⏱️ What I Explored Today: 🔹 Lists in Python 🔹 String operations 🔹 Basic problem-solving using lists & strings 🔹 Combining concepts to build logic 💻 Mini Project: Built a simple calculator using Python ✔️ Performed basic operations like addition, subtraction, multiplication, and division ✔️ Used functions and conditions to structure the logic ✔️ Focused on writing clean and understandable code 💡 Why This Matters: Learning concepts is important, but applying them in small projects makes everything clearer and more practical. 💡 Impact of Learning: ✔️ Improved my understanding of lists and strings ✔️ Gained confidence in combining multiple concepts ✔️ Got hands-on experience in building a small functional program ✔️ Moving one step closer to building real-world applications 🔥 Big Realization: Even a small project can teach more than just theory — implementation is where real learning happens. 🎯 Next Step: Work on more mini projects and start exploring slightly advanced Python concepts. Learning → Applying → Improving 🚀 #Python #ArtificialIntelligence #MiniProject #LearningJourney #100DaysOfCode #GUVI #StudentDeveloper
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