What error are you receiving? The code is working on its own.
whatever = True
def thefunc():
print("Works!")
while whatever == True:
print("""
1-Whatever
2-Whatever
3-Whatever
""")
choice = input("Choice: ")
if choice == "1":
thefunc()
elif choice == "2":
print("...")
elif choice == "0":
whatever = False
else:
print("... again")
As long as you've declared the function at some point before calling it, your code should work. There's nothing wrong in your code, but make sure that your function has been declared properly.
Cheers,