Question: Question Goal: Reading from text files Assignment: You found a file named recipe.txt on your computer, which contains a recipe for Pizza Napoletana, and you

Question
Goal: Reading from text files
Assignment: You found a file named recipe.txt on your computer, which contains a recipe for Pizza Napoletana, and you decide that you would like to have one for dinner.
You need to find the ingredients in the recipe so you can make a grocery shopping list. To easily find the ingredients, you will write code that finds the first occurrence of the word "dough" and then prints its word position, or index, on the screen. For example, if "dough" is the 9th word in the file, your code should print 9.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!