Multiway Branching – the Missing switch Statement
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
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 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’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
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
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
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
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
Today we’ll be talking about the nested list and dictionary. Nested lists and dictionaries are often used to better structure… Read More »Nested List and Dictionary Basics
Today we’ll see how to use the underscore sign to retrieve the last result, or, to be more precise, the… Read More »How to Retrieve the Last Result with Underscore
Today we’ll see how Python uses interning to help you cache memory. Object Identities First, let’s create two variables and… Read More »Cache Memory with Interning in Python
In the previous part we saw how to use buttons in Kivy. The button is a really common Kivy widget.… Read More »Kivy Part 7 – More Kivy Widget Examples
Today we’ll see how to rename and move files in Python. Actually, it’s the same thing. First, let’s create a… Read More »How to Rename or Move Files in Python
Today we’ll be talking about fractions. Sometimes decimal fractions are not exactly what you want. You may want to operate… Read More »Fractions with the Python Fraction Type
Today we’ll see how to make a simple sine wave animation using Python. I’ll be using the 2.81 version of… Read More »Sine Wave Animation in Blender with Python Scripting
In the previous part we left off with a basic Kivy app that displays a label. Now let’s explore some… Read More »Kivy Part 6 – More Widgets – the Button Widget
We already talked about the dir function, which may come in really useful if you need to check an attribute… Read More »The Built-In help Function in Python
Sometimes you may need to check an object’s attributes. You can easily do it using the built-in dir function. You… Read More »The Built-In dir Function in Python
In the previous part we left off with a basic Kivy app that displays a label. In this part we’re… Read More »Kivy Part 5 – Label Properties
Today we’ll be talking about the difference between true division and floor division in Python. There are two kinds of… Read More »True Division vs Floor Division in Python
Before we rewrite our app using the Kivy language, let’s have a look at what we have. In the previous… Read More »Kivy Part 4 – Using Python and the Kivy Language
Today I’ll show you how to quickly check the length of a number. And by the length of a number… Read More »How to Check the Number of Digits of a Number
A commonly used function in Python is the zip function. You can use it to turn two lists of equal… Read More »How to Use the zip Function in Python
Sometimes you may want to loop over multiple lists or other sequences at the same time. You sure can do… Read More »How to Loop over Multiple Lists in Python
You can sort a list or any other sequence, or rather loop over a sequence in sorted order. To do… Read More »How to Sort a List Using the Sorted Function
You may sometimes need to loop over a sequence in reverse. To this end you can use the reversed function.… Read More »How to Loop over a Sequence in Reverse
Rounding numbers is such a common tasks that Python lets you do that out of the box. There’s a built-in… Read More »How To Round Numbers in Python
Sometimes you may need to reverse a string. How to do it in Python? To reverse a string all we… Read More »How To Reverse a String in Python