Skip main navigation

Conditional statements

This video explained how to use the if, elif, and else keywords to create conditional statements. Until this point, you have only worked with programs that run sequentially: lines of …

Python Variables

Python variables are simply containers for storing data values. Unlike other languages, such as Java, Python has no command for declaring a variable, so you create one the moment you …

Activity: Join the Python community

One thing you’ll quickly discover as you continue your professional path into Python programming is just how connected and engaged the online community is. If you’ve encountered a problem or …

Why learn Python?

How and why did Python emerge as one of the most popular languages? Who created it and why did they call it ‘Python’? The video explained the history of Python …

How to Start Coding in Python

This piece has been written with the following assumptions: You already know what Python is You have installed Python and IDE, and have written your first programs Now we can …

Python vs other languages

Why are some programming languages preferred over others? The best explanation for this is that every language excels in a certain area but Python serves a lot of purposes for …

How to Install Python

In this step, you will install all the software and tools you need to code in Python and to start building programs.   How to check if Python is installed …

Python Loops

Loops are blocks of code that keep repeating the same instructions until a certain condition is met. We also use loops to access the different items in a given sequence …

Wrap-up, reflect, and share

Congratulations! You’ve completed Week 2: Python basics. You’ve learned about the basic elements of Python programming. You learned how to create different types of variables and use them to store …

Functional Arguments

Consider the following example of a function: def say_hi(): return 'Hello and welcome to my program' print(say_hi())   So far, the function has used empty parentheses, but these parentheses serve …

Lists in Data Structures

Data structures have many purposes. One of them is to allow you to run looping code. When working with data, you need to organise it well. That’s why Python and …

How do functions work in programming?

Functions are blocks of reusable and organised code that usually perform a single, related action. They are a crucial part of programming because they save you a lot of time …