Posts for Python

How to Round Off Numbers in Python

In this article, you will learn how to round off numbers in Python. Let’s say you have a float variable with value 123.45 In order to round off numbers, you can use the math.ceil() method or math.floor() method. In this example, you will be rounding up and down the float variable ‘a’. Note: The math.ceil() […]

February 22, 2021 in Code examples
Deven
Deven wrote

5 ways to implement Python Switch Case statement

In this article, I will take you through the five ways to implement the Python Switch Case statement. A switch case statement in a computer programming language is a powerful tool that gives the total programmer control over the program’s flow according to an expression’s outcomes or a variable. Switch cases are mainly used to […]

January 26, 2021 in Python
Afolayan
Afolayan wrote

Recursion Explained In Python

If you have been programming with Python, chances are you’ve come across the term recursion. Chances are also that you might probably find this confusing at first, not to worry, this article should clear things up for you. Recursion is a very powerful programming concept that provides a simple, (neater in most cases), concise and […]

February 20, 2020 in Python & Tutorials