I'm currently writing a program about Currency Converter on Python and I'm in the last stage where I need help on a question where I ask "Do you want to convert again" and if the answer starts with "n" then I write a message and the program exits. Whereas the problem is that I want the program to restart if the user wants to convert again". I need to define how to restart the program but i'm not sure how. At the end its a else if the user writes anything else except "y" or "n" Help is much appreciated. So far it looks like this:
def restart_programme
answer=str(input('Do you want to convert again?'))
if answer.lower().startswith("n"):
print("Thank you for using Currency Converter today,Goodbye "+name)
exit()
if answer.lower().startswith("y") or ("Y"):
restart_programme()