Sep-20-2020, 06:25 PM
Hi,
I have this code:
I just can't get it.
can someone help me with convert the above? I cant figure what I'm missing.
Thanks
I have this code:
ordinal = ['2nd','3rd','4th','5th','6th','7th','8th','9th','10th','11th','12th'] ratio = [1.222223, 1.25, 1.33,4.3,1.23,2.323] i = 0 freq=int(input("Enter a fundamental frequency: ")) print(f"the fundumental frequency is: {freq}") while i < len(ratio): nfreq=freq*(ratio[i]) print(f"{ordinal[i]} note is: " + str(round(nfreq,3))) i += 1for hours now I try to convert the above code to a def function so I can use it with gui interface(or call it when ever I need it)
I just can't get it.
can someone help me with convert the above? I cant figure what I'm missing.
Thanks