numpy Part 8 – How to Copy a numpy Array
Today we’ll learn how to copy a numpy array. If you want to copy an array, you can use either… Read More »numpy Part 8 – How to Copy a numpy Array
Today we’ll learn how to copy a numpy array. If you want to copy an array, you can use either… Read More »numpy Part 8 – How to Copy a numpy Array
Today we’ll be talking about passing arguments to functions in Python. In particular we’ll be talking about argument types and… Read More »Argument Types and Matching Modes in Python
Today we’ll be talking about the Counter class from the collections module. The Counter class is used to create an… Read More »The Counter Class from the collections Module
In the previous part we started adding some code to the Python and kv files. In this part we’ll focus… Read More »Kivy Part 18 – Slugrace – Settings Screen GUI
Today I have a short drill for you. It’s about passing mutable and immutable objects as arguments to functions. If… Read More »Drill – Mutable and Immutable Objects as Arguments
Today we’ll be creating a simple plaque in Blender. I’ll be using the following features and techniques: add text edit… Read More »Modeling a Simple Plaque in Blender
Today we’ll be talking about state retention across function calls. If you prefer to watch a video version, here it… Read More »State Retention Across Function Calls in Python
Today we’ll be talking about the nonlocal statement. This article is sort of complementary to my article on the global… Read More »The nonlocal Statement in Python
Today we’ll learn how to create an array filled with ones, zeros or arbitrary data. Sometimes you may want to… Read More »numpy Part 7 – Arbitrary Data, ones and zeros Array
Today we’ll be talking about the global statement and global variables in Python. This article is sort of complementary to… Read More »The global Statement and Global Variables
Today we’ll discuss scopes. To start with, what is scope? Well, to keep it simple scope is the part of… Read More »Local, Nonlocal, Global and Built-in Variable Scope
Today we’ll be talking about saving the current value of a loop variable in functions nested in loops. Sounds more… Read More »Save Loop Variable’s Value in Functions Nested in Loops
In the previous part we created some files, both Python files and kv files. But they were left empty. Now… Read More »Kivy Part 17 – Slugrace – Some Basic Code to Start
Today we’ll be talking about closures, also known as factory functions. A closure is a function that remembers values in… Read More »Closures, aka Factory Functions in Python
Today we’re going to do some very basic color animation in Python. We’ll add a material to an object and… Read More »Color Animation in Blender with Python
Today our topic is: function in statement. Here’s the video version: Well, this is probably one of the topics you… Read More »Defining Function In Statement in Python
Today we’ll be talking about the PyDoc HTML reports, which can be used to read documentation in a more visual… Read More »PyDoc HTML Reports to Read Documentation
Today we’ll be talking about slicing numpy arrays. Slicing 1-Dimensional Arrays As far as slicing is concerned, there’s nothing special… Read More »numpy Part 6 – Slicing numpy Arrays
Today we’ll be talking about docstrings. Here’s the video version: Docstrings are used to document functions, classes and modules. They’re… Read More »How to Use Docstrings in Python
Today we’ll be talking about the multiple iterator and the single iterators. Here’s the video version: If you don’t feel… Read More »Multiple Iterator vs Single Iterator
In the previous part we created our project folder and put the assets folder in it. But we didn’t create… Read More »Kivy Part 16 – Slugrace – The File Hierarchy
Today we’ll be talking about the dictionary view. Actually, there are three of them, the keys view, the values view… Read More »Dictionary View: Keys, Values, Items
Today we’ll make a simple animation, in which a ball of tangled wire will rotate around its Z axis and… Read More »Tangled Wire Ball with a UV Sphere in Blender
Today we’ll briefly discuss the two built-in functions: all and any. They are very handy and make our life easier,… Read More »The ALL and ANY Built-in Functions
Today we’ll be talking about indexing numpy arrays. I’m sure you know how to index regular Python sequences like strings,… Read More »numpy Part 5 – Indexing numpy Arrays
Today we’ll be talking about the basics of the iteration protocol, and, to be more specific, about the concepts of… Read More »Iterable vs Iterator – What’s the Difference?
Today we’ll be talking about the else statement used in loops. You definitely know the else block from conditional statements… Read More »The else Statement in WHILE and FOR Loops
Today we’ll be talking about slicing strings. This is what you do if you need to make a substring from… Read More »Slicing Strings Using the Slice Operator in Python
In the previous part of this Kivy programming series you saw the assets that we’ll need for the project. They… Read More »Kivy Part 15 – Slugrace – The Project Folder
Today we’ll be talking about using the string index in Python. Here’s the video version: As you know, strings are… Read More »How to Use the String Index in Python
Today we’ll be talking about the shape of a numpy array. The shape of an array is a tuple of… Read More »numpy Part 4 – The Shape of a numpy Array
Today we’ll be talking about Python boolean operators: and, or and not. In particular we’ll have a look at what… Read More »Boolean Operators in Python and What They Return
Today we’ll be talking about multiway branching, and, to be more precise, we’ll see how to cope with the fact… Read More »Multiway Branching – the Missing switch Statement
As I mentioned in the previous part we’re going to make a short break from programming now and have a… Read More »Kivy Part 14 – Game Assets for the Slugrace Project
Today we’ll be talking about extended sequence unpacking. We’ll see how to assign the elements of a sequence to multiple… Read More »Extended Sequence Unpacking in Python
Today we’ll be talking about the notion of shared reference. What are shared references in Python? Multiple References to Immutable… Read More »Shared Reference with Mutable and Immutable Types
Today we’ll be talking about numpy array dimensions. Vectors – 1-Dimensional Arrays In numpy we can create multidimensional arrays. The… Read More »numpy Part 3 – numpy Array Dimensions
Today we’ll be talking about comparing the relative magnitudes of objects. Here you can watch the video version: It seems… Read More »Compare Objects in Python – Not Just Numbers
In the previous part we discussed some of the Kivy layouts that we’re going to make use of throughout our… Read More »Kivy Part 13 – Embedding Layouts
Today we’ll be comparing the == operator and the is operator. The former tests value equivalence, the latter tests object… Read More »Equality Checks (== vs the is Operator)
Today we’re going to use Python to extrude in Blender along a function graph. We’ll have a look at the… Read More »Extrude in Blender Along Function Graphs Using Python
In the first part of the series you learned how to install numpy and you saw an example of a… Read More »numpy Part 2 – Creating numpy Arrays
Today we’ll be talking about the named tuple. Here’s the video version if you feel like watching it first: Regular… Read More »Using the Named Tuple in Python
You now know how to position and scale widgets inside layouts, but we’ve been using only the FloatLayout so far.… Read More »Kivy Part 12 – Kivy Layouts Explained
Today we’ll learn how to send text to file using the print function. Here’s the video version if you want… Read More »How to Send Text to File Using the print Function
Today we’re going to do some very basic stuff in Blender, add some objects. We’re going to do it in… Read More »How to Add a Blender Object in Python
Today we’ll be talking about the very basics of mathematical computations in Python using the numpy module. This is the… Read More »numpy Part 1 – Introduction to numpy
Today we’ll be talking about sorting lists. We’ll be using the sort method and the built-in sorted function. If you… Read More »Sorting Lists with the sort and sorted Functions
In the previous parts we saw how widgets on their own and widgets in layouts are positioned and scaled. Before… Read More »Kivy Part 11 –Advanced Scaling and Positioning
Today we’ll make a simple tunnel animation using the follow path constraint, in which the camera will move along a… Read More »Tunnel Animation with Follow Path Constraint
Today we’ll be talking about slice assignment in Python. It works with lists, which are mutable. We’ll also learn how… Read More »Slice Assignment in Python – How Does It Work?
Today we’ll discuss some of the most used functions from the random module. They are used if you need random… Read More »Random Numbers and the random Module in Python
Today I’d like to show you how to copy a list in three different ways. We’ll be focusing on shallow… Read More »How to Copy a List in Python in Three Different Ways
In the previous part we listed all the Kivy layouts and mentioned briefly the rules of positioning widgets inside layouts.… Read More »Kivy Part 10 – Widget Size and Position in Layouts
Let’s have a look at the basic trig functions. How can you use them in calculations with Python? The three… Read More »Trig Functions in Python: sine, cosine, tangent
There are lots of built-in math functions in Python. If you don’t find the one you need, chances are that… Read More »Math Functions Often Used in Python
Today we’ll make a simple spring model in Blender. Thanks to the Screw modifier it’s very easy to do, so… Read More »A Simple Spring Model in Blender
Although we usually use the decimal number, which is the one we learned in the very first years of our… Read More »Decimal Number vs Binary, Octal and Hexadecimal
Before we jump into the Kivy layout basics, let’s recap on what we know. But before we delve into the… Read More »Kivy Part 9 – Kivy Layout Basics
Today we’ll see how to check the object type in Python. We’ll be making use of two functions: type and… Read More »How to Check the Object Type in Python