🐍Python Day 3 Each day, the logic gets tougher, but so does my clarity. 🔹 What I Tried: I wanted to take yesterday’s logic and make it work across multiple numbers instead of just one. 🔹 What I Built: A Python program that: ✅ Generates numbers within a range ✅ Checks if they’re even, odd, positive, or negative ✅ Detects prime numbers efficiently using the √n trick 🔹 What I Learned: Even a small piece of code can teach how to think systematically — to break a big problem into smaller parts and optimize as you go. Coding truly shapes how you feel, not just what you type. 🔹 What Was Challenging: Getting the prime number logic right without unnecessary loops. It took a few test runs (and print statements), but it finally clicked. Each day, a new script. Each script is a new insight. On to the next challenge! #PythonJourney #100DaysOfCode #LearnToCode #WomenWhoCode #CodingCommunity #PythonForBeginners #ProblemSolving #TechLearning #CodeNewbie #LogicBuilding #KeepLearning
Python Day 3: Building a Program for Number Properties
More Relevant Posts
-
Had one of those classic "bug" moments that turned out to be a fundamental Python feature: lexical closures. It was bugging me, so I had to go deep. In short, a closure is when a nested function remembers the variables from its "enclosing" scope, even after that scope has finished. Why it's powerful: It's perfect when you need multiple functions to react to a single, changing piece of state without using global variables. Why it's a headache (the 'gotcha'): It can be a real trip-up if you're not expecting it, especially in loops where all your functions might end up using the last value of the loop variable. (Ask me how I know 😂) It's a classic feature that, when used right, is super clean. When used by accident, it's a real head-scratcher. What's a "simple" Python feature that's given you a headache before? #Python #SoftwareDevelopment #Programming #PythonDeveloper #DevCommunity
To view or add a comment, sign in
-
-
🚀 Day 29/100 – Third Maximum Number (LeetCode #414) Today’s problem focused on finding the third distinct maximum number in a list — a task that tests both logic and precision. It was a great exercise in sorting, distinct values, and edge cases. This problem reminded me that simplicity in approach often leads to clearer, faster solutions. 🔍 Key Learnings: Handling duplicates using Python sets Sorting efficiently to extract specific elements Always account for edge cases in logic-based questions 🔗 Problem link:https://lnkd.in/gGHddwQB 🧠 Language: Python Every challenge strengthens the coding mindset — one function at a time. On to Day 30 💪 #100DaysOfCode #LeetCode #Python #CodingChallenge #ProblemSolving #Algorithms #PythonProgramming #DataStructures #DailyCoding #CodeJourney #TechCommunity #ProgrammerLife #LearnCoding #CodingConsistency
To view or add a comment, sign in
-
-
Day 57 of #100DaysOfCode Solved LeetCode Problem 3461: Check If Digits Are Equal in String After Operations I ✅ This problem involved iteratively performing modulo operations on consecutive digits of a string until only two digits remain and then checking if they are equal. It tested skills in: String manipulation Iterative logic Modulo arithmetic 💡 Key Takeaways: Reinforced understanding of working with string-to-integer conversions. Practiced efficient looping and array manipulation in Python. Strengthened problem-solving mindset for algorithmic challenges. ⏱ Performance: Runtime: 21 ms — beats 95% of submissions Memory: 17.73 MB — beats 71% of submissions #100DaysOfCode #LeetCode #Python #CodingChallenge #Algorithm #ProblemSolving #CompetitiveProgramming #TechSkills #SoftwareDevelopment #CodingJourney #CodeNewbie #PythonProgramming #DevCommunity #ProgrammingLife #LearnToCode #CodeDaily #TechLearning #PythonDeveloper #CodePractice #ProgrammingChallenge
To view or add a comment, sign in
-
-
📘 Day 23 of My #50DaysOfPython Challenge 🐍 ✅ Task: Count Even and Odd Numbers in a List Today's task was a simple and beginner-friendly exercise, but it helped me revisit some core Python concepts like loops, conditions, and modular arithmetic. 🔍 What I practiced today: 🔸 Using % to check if a number is even or odd 🔸 Looping through a list 🔸 Maintaining counters 🔸 Writing clean and readable code 🧪 Example: If the input is: 1 2 3 4 5 The output will be: Even numbers: 2 Odd numbers: 3 💡 Key takeaway: Small tasks like this strengthen logical thinking and help build a strong coding foundation. Every day, every line of code adds up! 💻✨ #Python #CodingChallenge #50DaysOfPython #CodingPractice #LearnByDoing #CodingJourney
To view or add a comment, sign in
-
When print() Saves the Day. Let’s be honest, debugging in Python is 50% logic, 50% hope, and 100% print() statements. 😅 There’s something oddly comforting about adding a print() line, rerunning your code, and whispering: “Can you show me where I went wrong?” Over time, I’ve learned that debugging isn’t just about fixing errors, it’s about understanding the story your code is trying to tell. Even with the smartest debugging tools, sometimes print() is still the real MVP. 💪 Because behind every “perfect” program is a developer who once spammed print("check") 15 times until things finally made sense. 😆 #MachineLearning #DataScience #LearningInPublic #SimplifiedML #Careerjourney #LearnMLWithEase #MLMadeSimple #UnderstandingML #MLforEveryone #EasyMLGuide #MLBasics #SimpleMLConcepts #MLInPlainLanguage #DataAnalytics
To view or add a comment, sign in
-
-
🗓️ Day 274: Time Travel in Python with datetime Ever needed to find what date falls 7 days from now? Or calculate how long it’s been since your last deadline? That’s where Python’s datetime module shines! It’s one of those tools that quietly powers everything — from logs and APIs to attendance systems and time-based automation. 👉 Here’s a tiny example to get you started: from datetime import datetime, timedelta # Get current time now = datetime.now() print(f"Right now: {now}") # Add 5 days future = now + timedelta(days=5) print(f"In 5 days: {future}") 💡 Pro tip: Combine datetime with formatted outputs (strftime) to create readable timestamps for reports or scheduled tasks. 🔹 Challenge for today: Write a script that calculates how many days are left until your next birthday 🎂. #Python #Datetime #CodeEveryday #LearnTogether
To view or add a comment, sign in
-
Day 12 – Organizing Python Code Like a Pro 🧩 Today, I explored how to make Python code more structured and reusable by creating modules and packages. It’s all about keeping things clean, breaking big code into smaller, focused parts that can be imported anywhere. What’s cool is that I practiced this directly in Google Colab, writing real .py files using `%%writefile` and organizing them into folders like a real project structure. I got the task and learning flow from AI (my coding partner 😎), and every day feels like building something bigger step-by-step. #PythonLearning #Day12 #100DaysOfCode #LearningJourney #AIChallenge #Colab
To view or add a comment, sign in
-
Over the weekend, I delved into Python's functions, uncovering some valuable insights: - Functions streamline your code by allowing you to write a block once and reuse it, ultimately saving time and simplifying maintenance efforts. - Apart from lambda functions which deviate from the standard syntax, All functions typically start with "def ***(a, b): " where *** denotes the function's name, with relevant variables within the parentheses like (a, b) in the example. - The function's body dictates the iteration process over the variables, resulting in a specific output through the "return" statement. Functions serve as a cornerstone for automation. - Demonstrated below is a 'fizzBuzz' function, designed to list numbers from 1 to a specified number "n". Notably, multiples of 3 are replaced by "Fizz", multiples of 5 are replaced by "Buzz", and multiples of 15 are replaced by "FizzBuzz". Fizzbuzz(5) Upon calling the function with "n" assigned as 5 (per the line of code above), the result is returned as: ['1', '2', 'Fizz', '4', 'Buzz'] #Python #Functions
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