Python Forum
processes a series of text file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
processes a series of text file
#1
Hello everyone! I should solve an exercise in python language and I am not able. This is the exercise:
"Create a Python program that processes a series of text files that contain information related to a set of recipes.
File: Apple Pie.txt
Apples, 4
Sugar, 5
Flour, 6
Eggs, 2

File: Spaghetti in white.txt
Spaghetti, 100

Each file is called as a recipe. It contains the ingredients of that recipe. Each ingredient also has a quantity.

1. For each ingredient, print how many recipes it is associated with.
2. Find recipes that share at least 2 ingredients.
3. For each recipe print how many are its ingredients.
4. Find recipes with the same ingredients.

Thanks in advance!
Reply


Messages In This Thread
processes a series of text file - by paolozzigiuseppe9 - Jan-09-2020, 09:26 AM
RE: processes a series of text file - by perfringo - Jan-09-2020, 10:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Convert text from an image to a text file Evil_Patrick 5 4,328 Jul-30-2019, 07:57 PM
Last Post: DeaD_EyE
  reading text file and writing to an output file precedded by line numbers kannan 7 10,486 Dec-11-2018, 02:19 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020