Writing on these pages is not enough. I want to meet you, interact with you, answer your questions, discover new things with you. That's why I'm launching The Python Coding Programme. It's not just any Python beginner's course—it's an active mentoring programme with live sessions. It has very small groups and a private forum to… Continue reading The Python Coding Programme: A Live Course for Beginners With Small Cohorts & Active Mentoring
Tag: Beginners
The terms beginners, intermediate, and advanced are often used, but they’re really hard to define. What’s intermediate for a beginner is beginner’s stuff for someone advanced, and so on. Still, at least Beginners has a clear starting point, so some posts will be tagged as beginners.
Anatomy of a 2D Game using Python’s turtle and Object-Oriented Programming
When I was young, we played arcade games in their original form on tall rectangular coin-operated machines with buttons and joysticks. These games had a resurgence as smartphone apps in recent years, useful to keep one occupied during a long commute. In this article, I'll resurrect one as a 2D Python game and use it… Continue reading Anatomy of a 2D Game using Python’s turtle and Object-Oriented Programming
Understanding The Difference Between `is` and `==` in Python: The £5 Note and a Trip to a Coffee Shop
The keyword is and the operator == are not the same. Yet, many programmers often use one when they should use the other. Let's look at the difference between is and == in Python with the help of a £5 note and a trip to my local coffee shop. In this article, you'll: Find out… Continue reading Understanding The Difference Between `is` and `==` in Python: The £5 Note and a Trip to a Coffee Shop
Using Type Hints When Defining A Python Function [Intermediate Python Functions Series #6]
You've already covered a lot of ground in this Intermediate Python Functions series. In this article, you'll read about a relatively new addition in Python called type hinting or type annotation. Unlike all the other topics you learnt about in the previous articles, this one will not change the behaviour of the function you define.… Continue reading Using Type Hints When Defining A Python Function [Intermediate Python Functions Series #6]
Argh! What are args and kwargs in Python? [Intermediate Python Functions Series #4]
In the first three articles in this Series, you familiarised yourself with the key terms when dealing with functions. You also explored positional and keyword arguments and optional arguments with default values. In this article, you'll look at different types of optional arguments. Rather unfortunately, these are often referred to by the obscure names args… Continue reading Argh! What are args and kwargs in Python? [Intermediate Python Functions Series #4]
Optional Arguments With Default Values in Python Functions [Intermediate Python Functions Series #3]
We continue our journey through Python functions by looking at optional arguments and default values. In this article, you'll see how you can define a function with an optional argument. A default value is used if the argument is not included in the function call. Overview Of The Intermediate Python Functions Series Here's an overview… Continue reading Optional Arguments With Default Values in Python Functions [Intermediate Python Functions Series #3]
Using Positional Arguments and Named or Keyword Arguments in Python Functions [Intermediate Python Functions Series #2]
In the first article in this Intermediate Python Functions Series, you made sure you got your terminology right. So you know what an argument is. But what are positional arguments and keyword arguments in Python? In this article, you'll see how you can choose to use either of the two in many situations. Later in… Continue reading Using Positional Arguments and Named or Keyword Arguments in Python Functions [Intermediate Python Functions Series #2]
Moving On From The Basics of Python Functions [#1 in Intermediate Python Functions Series]
Those learning to code learn about functions very early on in their journey. Not only do beginners use Python functions right from their first lesson, but they also learn to define their own Python functions early on. It may be tempting–and in my experience, it's a common pitfall early on–for a relative beginner to think… Continue reading Moving On From The Basics of Python Functions [#1 in Intermediate Python Functions Series]
Mini-Post: Exploring Python Functions Through Experimentation
Read the docs. Look at the source code. Yes, these are great tips to figure out what's happening underneath the hood. But sometimes you want to do a bit of experimentation and exploration of your own first. It's more fun this way. And sometimes more instructive, too. Here's something I came across today which I… Continue reading Mini-Post: Exploring Python Functions Through Experimentation
Functions in Python are Like a Coffee Machine
Functions in Python are one of those topics for beginners! Most understand what functions are at a basic level. However, there's much more detail and nuance to defining and calling functions in Python. As with most things in coding and Python, there's nothing better than a good analogy to picture what's happening behind the scenes.… Continue reading Functions in Python are Like a Coffee Machine