Answer:
Step-by-step explanation:
I do not have access to the ingredients list so instead I created the list and added the ingredients needed to make a cake. Then I used a for loop to loop throught the ingredients in the list and the .write() method to write the data to a text file with the same name as in the question. The code was tested and the output to the file can be seen in the attached image below.
ingredients = ['sugar', 'butter', 'eggs', 'vanilla', 'flour', 'baking powder', 'milk']
file = open('cake_ingredients_list.txt', 'w')
for ingredient in ingredients:
file.write(ingredient + '\\')