Python | Exponent Programming | Find 2 to the power n

Опубликовано: 04 Август 2026
на канале: Adeel Abbas
1,207
7

In this video we will be calculating the exponent of 2. In Python, we find exponent by using **. For instance, to find x to the power y we write x**y.

Example
2^3 = 8
So, in Python we will write 2**3

Similarly 2^10 = 1024
So, in Python we will write 2**10

In this video I am using Ubuntu 14.04 LTS and Python 2.7

You can download
Python from http://python.org/
Ubuntu from http://www.ubuntu.com/