Take two numbers from the users. Calculate the result of second number power of the first number.
To power, you will need to use two asterisks symbols (two multiplication symbols). For example 4 to the power 3 will be
result = 43**
base_num = int(input('Give me the base number: '))
power_num = int(input('Give me the power number: '))
result = base_num ** power_num
print('Your result is: ', result)
Python has a built-in function named pow [blue]. The pow is a short form of the word power. And you can pass 2 numbers to the pow function. It will give you the second number as a power of the first number.
Python has a built-in function named pow [blue]. The pow is a short form of the word power. And you can pass 2 numbers to the pow function. It will give you the second number as a power of the first number.
base_num = int(input('Give me the base number: '))
power_num = int(input('Give me the power number: '))
result = pow(base_num, power_num)
print('Your result is: ', result)