Skip to content

ckdbtech

  • Home
  • About Us
  • Contact Us

python

Python

Blog Post #43: Debugging 101: Finding Mistakes in Your Logic

October 2, 2025 by Debjeet Bhowmik

As our programs grow more complex with conditional logic (Post #25) and loops (Post #31, Post #34), it becomes increasingly likely that we will make mistakes. This is a normal and expected part of programming! A mistake in a program is called a bug, and the process of finding and fixing it is called debugging. … Read more

Categories python Leave a comment

Blog Post #42: Practical Nested Loops: Printing Patterns to the Console

October 2, 2025 by Debjeet Bhowmik

In Post #41, we learned the theory behind nested loops and saw how the inner loop completes its full cycle for each iteration of the outer loop. While generating combinations is useful, one of the best ways to truly understand this flow is to create something visual. In this fun, hands-on post, we will use … Read more

Categories python Leave a comment

Blog Post #41: Loops Inside Loops: Mastering Nested Loops

October 2, 2025 by Debjeet Bhowmik

In Post #29, we saw how placing an if statement inside another one—a technique called nesting—allowed us to create more detailed, multi-level logic. We can apply the exact same principle to loops to solve more complex problems. In this post, we will explore the concept of nested loops. You’ll learn how a loop running inside … Read more

Categories python Leave a comment

Blog Post #40: An Unusual Feature: The else Block in Loops

October 2, 2025 by Debjeet Bhowmik

We’ve spent the last two posts learning how to control the flow inside our loops with break (Post #38) and continue (Post #39). Now, we’re going to look at a unique and somewhat surprising feature of Python’s loops that you won’t find in many other languages: the optional else block. This isn’t the same else … Read more

Categories python Leave a comment

Blog Post #39: Skipping Ahead: Using the continue Statement

October 2, 2025October 2, 2025 by Debjeet Bhowmik

In Post #38, we learned how to use the break statement to exit a loop entirely. It’s our “emergency exit” when we’ve found what we’re looking for or need to stop the whole process immediately. But what if we don’t want to end the whole loop? What if we simply want to skip the current … Read more

Categories python Leave a comment

Blog Post #38: Taking Control: How to Exit a Loop Early with break

October 2, 2025 by Debjeet Bhowmik

So far, the loops we’ve written have all had one thing in common: they run until their natural end. A for loop runs for every item in a sequence, and a while loop runs until its condition becomes false. But what if you need to stop a loop prematurely? Imagine you are searching through a … Read more

Categories python Leave a comment

Blog Post #37: Iterating with Style: Looping Through Lists and Dictionaries

October 2, 2025 by Debjeet Bhowmik

We now have a solid understanding of both for and while loops (Post #34, Post #36). We know that for loops are the perfect tool for iterating over sequences, and so far, we’ve mostly used them with strings and the range() function. In this post, we’re going to get a sneak peek at how to … Read more

Categories python Leave a comment

Blog Post #36: for vs. while: Which Loop Should You Use?

October 2, 2025 by Debjeet Bhowmik

In our journey through Python’s control flow, we have now learned about two powerful tools for repetition: the while loop (Post #31) and the for loop (Post #34). Both allow you to execute a block of code multiple times, but they are designed for different situations. This post is a practical guide to help you … Read more

Categories python Leave a comment

Blog Post #35: Generating Numbers on Demand with the range() Function

October 2, 2025 by Debjeet Bhowmik

In Post #34, we learned that the for loop is the perfect tool for iterating over a sequence like a string or a list. But what if you don’t have a pre-existing sequence? What if you simply want to repeat a block of code a specific number of times, like 5 times or 100 times? … Read more

Categories python Leave a comment

Blog Post #34: The Most Pythonic Loop: Introducing the for Loop

October 2, 2025 by Debjeet Bhowmik

In our previous posts, we learned about the while loop. It’s a fantastic tool for repeating a block of code as long as a condition is true, especially when we don’t know how many repetitions we’ll need, like in our menu project from Post #33. But what if our goal is different? What if we … Read more

Categories python Leave a comment
Older posts
Newer posts
← Previous Page1 … Page6 Page7 Page8 … Page11 Next →
  • ai (50)
  • bash (8)
  • cheatsheet (2)
  • git (6)
  • gitlab (17)
  • kubernetes (1)
  • python (103)
  • terraform (31)
Recent Posts
  • Blog Post #103: The Full Function Signature: Ordering All Argument Types
  • Blog Post #102: Accepting Key-Value Arguments with **kwargs
  • Blog Post #101: Taking a Variable Number of Arguments with *args
  • Blog Post #100: A Glimpse into Professional Code: An Introduction to Type Hinting
  • Blog Post #99: Documenting Your Code: The Power of Docstrings
  • Blog Post #98: Decoding Python’s Variable Lookup: The LEGB Rule
  • Blog Post #97: Modifying the Outside World: The global Keyword
  • Blog Post #96: The Big Picture: Understanding Global Scope
  • Blog Post #95: Inside the Box: Understanding Local Scope
  • Blog Post #94: An Introduction to Variable Scope
  • Blog Post #93: Returning Multiple Values at Once
  • Blog Post #92: What Happens When You Don’t Return? The None Type
  • Blog Post #91: Getting Data Back: The return Statement
  • Blog Post #90: The Mutable Default Argument Pitfall: A Common Beginner Mistake
  • Blog Post #89: Making Arguments Optional with Default Parameter Values
  • LinkedIn
  • Facebook
  • Twitter
  • RSS Feed

FooterMenu

  • Privacy Policy
  • Disclaimer
  • Terms of Use
© 2025 ckdbtech