def mainquestion():
conversion = input("This program will convert miles to kilometers if you type miletokm.\nIf you want to convert kilometers to miles then type kmtomiles.\nHowever if you want to convert Celcius to Farenheit type ctof. \nFinally, if you want to convert Farenheit to Celcius type ftoc.")

Every time you call mainquestion() it's going to ask the user what they want to convert. So if they enter ftoc the first time, the first if will fail, and then the elif will call mainquestion() again, so they'll have to answer the question again. This will go on until they get to the final elif.

You can put all the if/elif/else code inside mainquestion(). They should just test the variable conversion.

def mainquestion():
conversion = input("This program will convert miles to kilometers if you type miletokm.\nIf you want to convert kilometers to miles then type kmtomiles.\nHowever if you want to convert Celcius to Farenheit type ctof. \nFinally, if you want to convert Farenheit to Celcius type ftoc.")
if conversion in ["miletokm"]:
print(miletokm())
elif conversion in ["kmtomile"]:
print(kmtomile())
elif conversion in ["ctof"]:
print(ctof())
elif conversion in ["ftoc"]:
print(ftoc())
else:
mainquestion()
mainquestion()

Email codedump link for My code is used to find conversions but it isnt working please assist