こんにちは、必要に応じて再読み込みできるテキスト ドキュメントにいくつかのファイルを保存するプログラムに取り組んでいます。以下はコードの冒頭ですが、実行すると、テキスト ファイルの名前として定義したと思っていたときに、「recipe_title が定義されていません」というトレース バック エラーが表示されます。私が間違ったことを教えてください。
import sys
opt=0
def choice1():
print("WORKED")
def choice2():
Recipe_Name = input("Please enter a recipe name: ")
Recipe_List = open(recipe_title.txt,"w")
Recipe_List.write(recipe_title+"\n")
def ingredient_input_loop(recipe_title, ):
Recipefile = open(recipe_title,"w")
if(ingredient== "end" or "End" or "END" or "EnD" or "eNd" or "enD" or "ENd" or "eND"):
Recipe.write(recipe_title)