## How to convert binary to decimal in Python

In this post, we are going to learn how to convert binary to decimal in Python with examples by using built-in functions and without built-in functions. 1. How to convert binary to decimal in python inbuilt function In this example we are using Python built-in int() function returns an integer from a string or number. […]

## 4 Python Programs to reverse a string

In this post, we are going to explore different 4 Python Programs to reverse a string. that includes reverse string using recursion, reverse string using for loop, reverse string using slicing. 1. Python program to reverse string using for loop In this Python program we have defined a function that takes string that we have […]

## Python Convert binary to decimal(without builtin function)

In this post, we are going to learn Python convert binary to decimal without a built-in function. 1. Python Program binary to decimal In this example, we have defined a function BinaryToDecimal() that takes a binary number as an argument, and for loop to iterate over each digit of the binary number to calculate decimal […]

## convert decimal to binary in Python

In this post, we are going to convert decimal to binary in Python with examples using built-in bin(), format() and f-string and recursion. 1.Bin() function convert decimal to binary in Python In this example, we are using the bin() function to convert binary to decimal. It adds “0b” as the prefix of string representation using […]

## How to convert string to binary in Python(4 ways)

In this post,we are going to learn how to convert string to binary in Python with examples using built in function join() ,ord() ,format() and bytearray(),map(),bin() and Math module. 1. Using ord(),format() to convert string to binary In this example, we are using three functions join(), ord(), format() to convert string to its binary representation […]

## How to do Convert int to binary in Python

In this post, we will explore How to do Convert int to binary in Python using the built-in method and str.format() and f-string. 1. bin() function to Convert int to binary in python The Python inbuilt bin() function is used to get an integer’s value binary representation that it returns as a string prefixed with […]

## Raise a number to power in python

In this post, we are going to learn how to Raise a number to power in python. By using 8 ways to raise a number to power in python or the finding power of a number in Python for example. The exponential of the number in math terms means how many times a number multiplies […]

## Python Program to find area of triangle using coordinates

In this post, we are going to learn Python Program to find area of triangle using coordinates. We will define a class and function to make code reusable. 1. Python program to find area of triangle using coordinates The coordinates for all three sides of the triangle are A(x1, y1), B(x2, y2), and C(x3, y3). […]

## 4 ways to find area or perimeter of rectangle

In this post, we are going to understand 4 ways to find area or perimeter of rectangle with a python program code example that includes finding the area of a rectangle using class, function, the perimeter of a rectangle. 1. Simple Program to find area of a rectangle In this Python program code, we will […]

## How to do calculate area of a circle in Python

In this post, we are going to learn How to calculate the area of a circle in Python with some code and math modules. 1. Python Program to Find area of circle To find the area of the circle we taking the circle radius input from the user using the input() method and convert the […]