Day 5 of #60DaysOfMiniProjects From generating QR codes to now decoding them — leveling up step by step. Today I built a QR Code Scanner using Python that reads a QR image and extracts the embedded data instantly. What this project does: • Accepts a QR image as input • Detects and decodes the QR code • Extracts hidden text/URLs • Handles errors gracefully Concepts I worked with: • Image processing using PIL • QR decoding with pyzbar • Exception handling • Writing cleaner, production-style code • Improving program reliability Now I’ve built both a QR Generator + QR Scanner — completing the full workflow cycle. Small projects. Real concepts. Daily progress. Consistency builds confidence. #Python #MiniProjects #BuildInPublic #CodingJourney #CSE #DeveloperGrowth #LearningInPublic
More Relevant Posts
-
Not every arithmetic operator works with every type in Python. 🧮 "hi" + 5 is a TypeError. 3 * "ab" is "ababab". And // and % don't work with complex numbers. I wrote a short guide that clears it up: ✅ Which operators work with int, float, bool, complex, and string ✅ Result type: when you get int vs float vs complex vs string ✅ String: only + (concatenation) and * (repeat with int) ✅ Complex: no // or % — and why ✅ Division by zero, int+string, float*string — what to avoid ✅ Result-type summary + practice problems with answers ~7 min read. Straight to the point. https://lnkd.in/gwg3vgZf #Python #Programming #Coding #Beginners #LearnToCode #DataTypes #ArithmeticOperators #Tech #SoftwareDevelopment #CodingTips
To view or add a comment, sign in
-
-
🧠 Python Concept: List Comprehension Write powerful loops in one clean line. ❌ Traditional Way squares = [] for i in range(5): squares.append(i * i) print(squares) Output [0, 1, 4, 9, 16] ✅ Pythonic Way squares = [i * i for i in range(5)] print(squares) Same result, less code. ⚡ With Condition even_squares = [i * i for i in range(10) if i % 2 == 0] print(even_squares) Output [0, 4, 16, 36, 64] 🧒 Simple Explanation Imagine telling a robot: 👉 “Give me squares of numbers from 0–4.” 👉 Instead of repeating instructions, you give one rule. 👉 That rule = list comprehension. 💡 Why This Matters ✔ Shorter code ✔ Faster execution ✔ More readable loops ✔ Very Pythonic 🐍 Python often replaces multiple lines with a single elegant expression 🐍 List comprehensions are one of the most powerful examples of that philosophy. #Python #PythonTips #PythonTricks #AdvancedPython #List #ListComprehension #Tech #CleanCode #LearnPython #Programming #DeveloperLife #DailyCoding #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 4 – DSA Daily Series Move Zeroes (LeetCode 283) using Python. 🧠 Problem Given an integer array nums, move all 0’s to the end of the array while maintaining the relative order of the non-zero elements. Important constraints: • The operation must be done in-place • No extra array should be created Example: Input: nums = [0,1,0,3,12] Output: [1,3,12,0,0] 💡 Approach Used the Two Pointer technique. • Maintain a pointer k to track the position for the next non-zero element • Traverse the array using index i • Whenever a non-zero element is found, swap it with the element at position k • Increment k This ensures: • Non-zero elements move to the front • Zeros automatically shift toward the end ⏱ Complexity Time Complexity: O(n) – single pass through the array Space Complexity: O(1) – in-place modification 🔎 Key Learning This problem helps strengthen: • Two Pointer pattern • In-place array manipulation • Maintaining relative order while rearranging elements Consistency is key when practicing DSA — solving one problem at a time. 🚀 #DSA #LeetCode #Python #Algorithms #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
Today I built a Mini Search Engine in Python. What started as a simple word finder evolved into a ranked search engine with: • Multi-file indexing • Multi-word search (AND logic) • Word frequency ranking • Highlighted results • Colored CLI output This project helped me strengthen my understanding of: Dictionaries and nested data structures File handling String processing Search logic and ranking Small consistent upgrades turned a basic script into a polished tool. Next step: turning it into a web-based search engine. #Python #Programming #SoftwareDevelopment #Learning
To view or add a comment, sign in
-
-
Tried solving a sliding window problem today in Python Found the maximum average subarray of size k without recalculating everything again and again — just shifting the window and updating the sum. Simple logic, but really powerful for optimization! nums = [1,12,-5,-6,50,3] n = len(nums) k = 4 max_avrg = float("-inf") window = sum(nums[:k]) max_avrg = window/k for j in range (k,n): window = window - nums[j-k] + nums[j] if max_avrg < window/k: max_avrg = window/k print(max_avrg) Learning DSA step by step #Python #DSA #SlidingWindow
To view or add a comment, sign in
-
Day 25 – divmod() print(divmod(10, 3)) Use: Quotient & remainder Content: Used divmod() to get quotient and remainder. Useful in math logic. #Python generate like a cartoon style image Image created Generated image Generated image Generated image Share Gulive description to post in. Linked in Here’s a clean LinkedIn-ready description for your post: 🚀 Day 25 of #30DaysOfCode – Learning divmod() in Python Today I explored the divmod() function in Python. print(divmod(10, 3)) 🔹 divmod() returns both the quotient and remainder in a single step. 🔹 Output: (3, 1) 🔹 It combines the functionality of // (floor division) and % (modulus). This function is especially useful in mathematical logic, time calculations, and problem-solving scenarios where both values are needed together. Small functions, big impact! 💡 #Python #PythonBasics #CodingJourney #LearnToCode #Programming #30DaysOfCode
To view or add a comment, sign in
-
-
Finding Maximum Sum of k Consecutive Elements in Python Check out this simple sliding window trick to get the maximum sum of k consecutive numbers in an array. I used my own code to solve it: Python Copy code nums = [7,1,5,1,3,2] k = 3 n = len(nums) window = sum(nums[:k]) sums = window for i in range(k,n): window = window - nums[i-k] + nums[i] if sums < window: sums = window print(sums) How it works: Start with the sum of the first k numbers Slide the window by removing the first number and adding the next Keep track of the maximum sum Fast, simple, and efficient! #Python #DSA #Coding #Algorithms #LearnByDoing #DeveloperLife
To view or add a comment, sign in
-
Today I implemented Serialize and Deserialize Binary Tree in Python. The goal of the problem is to convert a binary tree into a string so it can be stored or transferred, and later reconstruct the exact same tree from that string. I used a BFS (level order traversal) approach for this. Idea: • Traverse the tree level by level using a queue. • Store node values in a list. • For missing children, store a special marker (#) so the structure of the tree is preserved. • Join the list into a single string. For deserialization, the process is reversed: • Split the string back into values. • Rebuild the tree using a queue. • Attach left and right children in the same order they were stored. What I liked about this problem is that it shows how important it is to preserve structure, not just values. Without storing null nodes, reconstructing the same tree would be impossible. Time Complexity: O(N) Space Complexity: O(N) Problems like this are a good reminder that tree problems often combine traversal, data representation, and careful reconstruction logic. #DSA #BinaryTree #Python #Algorithms #CodingInterview
To view or add a comment, sign in
-
-
LeetCode Problem 1784: "Check if binary string has atmost one segment of ones": Given a binary string s without leading zeros, return true if s contains at most one contiguous segment of ones. Otherwise, return false. Approach: The idea is simple and straightforward, the given string has no leading zeroes, while looping ensure that after encountering the first segment of ones, no 1 is encountered. If this condition holds, then return True else False. The implementation in Python correctly resolves this problem optimally and efficiently. Time Complexity: O(n) where n is length of given string Space Complexity: constant #LeetCode #Python #Strings #DataStructures #Algorithms #OptimalSolution #ProblemSolving #CompetitiveProgramming #DailyCoding #Programming
To view or add a comment, sign in
-
-
👉 Question for you: How would you optimize this solution to avoid nested loops? 💡 Python Logic Problem – Find Two Numbers Whose Sum = 9 Today I practiced solving a small array problem in Python. Given a list of numbers: [2, 7, 11, 15, 6, 3] The task was to find two numbers whose sum equals 9. 🔹 Approach I Used: ✔️ Iterated through the list using nested loops ✔️ Compared each pair of numbers ✔️ Checked if their sum equals the target value (9) ✔️ Printed the matching pair 📚 Concepts Practiced: List indexing Nested loops Conditional logic Basic problem-solving approach Problems like this are common in coding interviews and data structure practice, so solving them helps strengthen logical thinking. Small improvements every day → Better programming skills 🚀 Let’s connect if you're also learning Python! #Python #PythonProgramming #CodingPractice #DataStructures #CodingInterview #LearnToCode #DeveloperJourney #100DaysOfCode #ProblemSolving
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