When logic gets "Weird" (in a good way!) 🐍 I just tackled the Python If-Else challenge on HackerRank. It’s a classic problem that tests your ability to handle multiple overlapping conditions: Is the number odd? (Weird) Is it even and between 2–5? (Not Weird) Is it even and between 6–20? (Weird) Is it even and over 20? (Not Weird) It sounds like a tongue-twister, but it’s a perfect exercise in using elif and range() efficiently. It’s a great reminder that software engineering is less about writing code and more about translating complex rules into clean, executable logic. 🧠 Onward to more Python fundamentals! 🚀 Question:https://lnkd.in/g_zVAAve solution:https://lnkd.in/g6CGvfX7 #Python #HackerRank #CodingLogic #SoftwareDevelopment #ContinuousLearning
M Heera Shanker’s Post
More Relevant Posts
-
Day 3/30 – Python Challenge 🐍 Today I built: File Search Tool 🔍 🔹 What it does: Searches for files in the system by name and returns their location instantly. 🔹 What I learned: Working with file systems using os module Traversing directories using os.walk() Handling user input and search logic 🔹 Challenge: Optimizing search for large directories and handling different file paths 👉 GitHub link: https://lnkd.in/dj_FEm5j Building real-world tools step by step 🚀 #Python #CodingChallenge #LearnInPublic #100DaysOfCode #Automation #DeveloperJourney
To view or add a comment, sign in
-
𝐏𝐲𝐭𝐡𝐨𝐧 𝐭𝐢𝐩𝐬 𝐟𝐫𝐨𝐦 𝐫𝐞𝐚𝐥‑𝐰𝐨𝐫𝐥𝐝 𝐩𝐫𝐨𝐣𝐞𝐜𝐭𝐬: After building a bunch of Python apps, here are 2 things I wish every beginner did from day one. ▪️𝐔𝐬𝐞 𝐚 𝐮𝐭𝐢𝐥𝐬.𝐩𝐲 𝐟𝐨𝐫 𝐜𝐨𝐦𝐦𝐨𝐧 𝐬𝐭𝐮𝐟𝐟 Don’t copy‑paste the same code everywhere. Keep your reusable functions in a utils.py and import them when needed. ▪️𝐋𝐨𝐠 𝐲𝐨𝐮𝐫 𝐞𝐫𝐫𝐨𝐫𝐬 𝐩𝐫𝐨𝐩𝐞𝐫𝐥𝐲 Skip empty except blocks. Set up a simple logger.py that writes errors to a log file so you always know what broke and where. #Python #SoftwareEngineering #CleanCode #ProgrammingTips
To view or add a comment, sign in
-
-
📅 Day 23 of My Python Full-Stack Journey — Logical Operators! Today I explored one of the most essential building blocks in programming — Logical Operators in Python 🐍 These three operators control the logic flow of your entire program: 🟠 and → Both conditions must be True 🟣 or → At least one condition must be True 🔵 not → Flips the boolean value pythonage = 20 has_id = True if age >= 18 and has_id: print("Access granted") # ✅ if age >= 18 or is_member: print("Welcome in!") # ✅ print(not False) # True Simple? Yes. But combine these and you can build powerful decision-making logic for login systems, access control, form validation, and more! The more I progress, the more I realize Python reads almost like plain English — and that's what makes it beautiful. 💡 📍 23 days down, 77 to go. Let's gooo! 🔥 #Python #LogicalOperators #Day23 #100DaysOfCode #FullStack #PythonForBeginners #LearningInPublic #CodingJourneyDay23 linkedinCode ·
To view or add a comment, sign in
-
-
Day 24/100 — Assignment Operators in Python 🐍 Today I explored one of the most underrated fundamentals — assignment operators! They're not just shortcuts. They make your code cleaner, faster to read, and more Pythonic. Here's what I covered: → = — Basic assignment → += — Add and assign → -= — Subtract and assign → *= — Multiply and assign → //= — Floor divide and assign → **= — Power and assign → %= — Modulus and assign The real insight? Instead of writing score = score + 10, just say score += 10. Your future self (and your teammates) will thank you. ✅ Small habits like using shorthand operators are what separate messy code from readable code. 24 days in. Still going strong. 💪 #Python #100DaysOfCode #FullStack #LearnPython #CodingJourney #PythonBeginners #DevLife
To view or add a comment, sign in
-
-
🚀 Day-79 of #100DaysOfCode 💻 Python Practice – Password Strength Checker Today I built a simple program to check whether a password is strong or weak based on multiple conditions. 🔹 Concepts Practiced ✔ String traversal ✔ Conditional logic ✔ Real-world problem solving 🔹 Key Learning This problem shows how basic programming concepts can be applied to real-world scenarios like user authentication and security. Moving beyond arrays → solving practical problems 🚀 #Python #CodingChallenge #ProblemSolving #100DaysOfCode #PythonDeveloper #LearnPython
To view or add a comment, sign in
-
-
Python Foundations: List vs Tuple vs Dictionary I always emphasize that strong fundamentals are the key to becoming a confident programmer. Today, I revisited and explained one of the most essential core concepts in Python — the difference between List, Tuple, and Dictionary. Understanding: • When to use a mutable structure like a List • Why Tuples are important for immutable data • How Dictionaries efficiently manage key-value pairs These concepts may seem basic, but they form the backbone of data handling in real-world applications, backend systems, and data-driven projects. Mastering fundamentals is not optional — it is essential. #Python #Programming #ComputerScience #SoftwareEngineering #CodingEducation #AiDeveloper
To view or add a comment, sign in
-
-
LeetCode #21 – Merge Two Sorted Lists | Python Implementation I implemented an iterative two-pointer merge approach for combining two sorted linked lists. A dummy node serves as the anchor, and a tail pointer builds the merged list by always selecting the smaller current node from either list. After one list is exhausted, the tail directly attaches the remainder of the non-empty list since it's already sorted. This avoids unnecessary node-by-node traversal and keeps the solution clean. This pattern is core to merge sort implementations, database query result merging, and distributed log aggregation systems where sorted streams must be combined efficiently. Key Takeaway: Using a dummy node eliminates edge case handling for the first node insertion, simplifying the logic significantly. The direct attachment of remaining nodes after one list is exhausted is an optimization that leverages the sorted property, avoiding redundant comparisons. Time: O(n + m) where n, m are list lengths | Space: O(1) #LeetCode #DataStructures #Python #LinkedList #TwoPointers #CodingInterview #ProblemSolving #SoftwareEngineering
To view or add a comment, sign in
-
🧩 The Registry Pattern isn’t new… but it’s often overlooked. Beyond just replacing if/elif chains, it can: - Break circular dependencies - Delay initialization of resources - Enable plugin architectures In my latest article, I break down how and why to use a registry in Python. 👉 https://lnkd.in/dX7a438u #python #softwaredevelopment #backend #architecture #designpatterns #engineering
To view or add a comment, sign in
-
oday I explored how backend works and understood how Python connects logic with real-world applications. ✔️ Revised core concepts ✔️ Learned about how servers handle requests ✔️ Strengthened my understanding of problem-solving Slowly moving from just writing code ➝ to understanding how systems actually work. Consistency + Curiosity = Growth 💡 #Python #BackendDevelopment #LearningInPublic #TechJourney
To view or add a comment, sign in
-
🚀 Day 19 of My Python Full-Stack Journey — Introduction to Operators 🐍 Today I explored one of the fundamental building blocks of programming — Operators in Python. At first, operators seemed simple. But as I went deeper, I realized they are the core of how programs make decisions, perform calculations, and compare values. Here’s what I learned today: 🔹 Arithmetic Operators Used for mathematical calculations + - * / % // ** From basic addition to exponentiation — Python makes math clean and readable. 🔹 Comparison Operators Used to compare values == != > < >= <= These are the backbone of conditional statements like if and elif. 🔹 Logical Operators and or not These help combine multiple conditions — making programs smarter and more dynamic. 🔹 Assignment Operators = += -= *= /= Efficient ways to update variables without rewriting long expressions. 🔹 Membership & Identity Operators in, not in, is, is not Small operators, but very powerful when working with collections and objects. 💡 What clicked for me today: Operators are not just symbols — they are the language that tells Python how to think. Every calculation, every decision, every condition in a program depends on operators. Step by step, concept by concept — building a strong foundation. On to Day 20! 🚀🔥 #Python #FullStackJourney #LearningInPublic #100DaysOfCode #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