user
Generate an algorithm to calculate the power of a number Output:
assistant
The following algorithm can be used to calculate the power of a number: 

1. Take two inputs, a base number and an exponent
2. Initialize a variable result and set it to 1
3. Start a loop from 1 to exponent 
    a. Multiply result with the base number
4. Print result