Please help me fix this recursive function so that I can successfully prompt the user at each stage. I am trying to make a program that allows users mix, change the playback speed and filter the signal of a wav file. To do that I need create a recursive question that continually prompts the user to use different tools in this program.
def c_function():
print("you have successfully called c_function")# These print statements are just place holders for the actual functions
return
def m_function():
print("you have successfully called m_function")
return
def f_function():
print("you have successfully called f_function")
return
def s_function():
print("you have successfully called s_function")
return
"use these functions as selection tools in the recursive function bellow"
user_question1 = input("Select one of the following four options:\n s see the sample rate of the file\n c change the playback speed\n m mix two signals together\n f filter the signal or\n q quit \n : ")
def recursive_main_function():
if user_question1 == ('c'):
c_function()
recursive_main_function()
if user_question1 == ('m'):
m_function()
recursive_main_function()
if user_question1 == ('f'):
f_function()
recursive_main_function()
else:
print("Invalid response. Please try again" + user_question1)
return