calculate power of any number

def raise_to_power(base_num, pow_num):
result=1
for index in range(pow_num):
result = result * base_num
return result

print(raise_to_power(2,8)) 

Comments

Popular posts from this blog

Multiple linear regression for GW depth estimaition

Class in Python

To check if a student has a honor's degree (Using Class in python)