"Exploring Functions and Scope in Coding"

💡 (6th Nov 2025) Today I Learned: Functions & Methods (Part 3) Today’s session took functions beyond basics — applying them to real coding problems and understanding how scope works inside programs. Here’s what I explored 👇 1️⃣ Primes in a Range — Using loops and conditionals to print all primes between two numbers. 2️⃣ Binary to Decimal Conversion — Applying mathematical logic and functions to transform binary inputs. 3️⃣ Code: Binary to Decimal — Reinforcing function calls and arithmetic operations. 4️⃣ Decimal to Binary Conversion — Reversing the logic using division and remainders. 5️⃣ Code: Decimal to Binary — Practical exercise to solidify logic understanding. 6️⃣ Method Scope — Understanding how variables inside methods are accessible only within them. 7️⃣ Block Scope — How variables declared within a block { } exist only inside it. 🧩 Key Takeaway: Functions + Scope = Predictable & Maintainable Code. Knowing where your variables “live” in memory is just as important as writing efficient logic. #CodingJourney #Java #DSA #Functions #Programming #Scope #ApnaCollege #LearningInPublic #DeveloperGrowth

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories