arrays

Arrays and Lists: Mastering Collections in Python

September 11, 2024
programming, coding101
programming, python, arrays, lists, data-structures

Welcome back to our programming tutorial series! Today, we’re diving into arrays and lists, fundamental data structures that allow you to store and manipulate collections of data efficiently. While Python doesn’t have a built-in array type, it offers lists which serve a similar purpose and are more flexible. What are Lists? # In Python, a list is an ordered collection of items. These items can be of any type - numbers, strings, or even other lists. ...

Question: Matrix Multiplication Why We Need Nested Loops

September 6, 2024
arrays, matrices, loops
arrays, matrices, loops

Understanding Matrix Multiplication: Why We Need Nested Loops # Preface: Addressing Talha’s Question # Recently, one of our community members, Talha, reached out with an interesting question about matrix multiplication. Talha was working on Day 5 of our coding challenge, which involves matrix multiplication, and found themselves stuck. Their specific question was: “Why do we need nested for loops for multiplication?” This is an excellent question, Talha, and it touches on a fundamental aspect of working with matrices in programming. ...