Answer:
The code is below and the sample output is attached.
Explanation:
import math
#Implementation of RaiseToPower method
def RaiseToPower():
#r = 2^(1/12)
r = math.pow(2,1/12)
#Get the input from user
#a key has a frequency ,sy f0
f0 = float(input('Enter f0 : '))
#Display statement
print(f0,end=' ')
#Iterate the loop up to
#next 4 higher key frequencies
for n in range(1,5):
#calculate the fn value
fn = f0 * math.pow(r,n)
#Display statement
print(fn,end=' ')
#call RaiseToPower method
RaiseToPower()