Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone code this in Python? Many recipes tend to be rather small, producing the fewest number of servings that are really possible with the

Can someone code this in Python?

image text in transcribedimage text in transcribed

Many recipes tend to be rather small, producing the fewest number of servings that are really possible with the included ingredients. Sometimes one will want to be able to scale those recipes upwards for serving larger groups This program's task is to determine how much of each ingredient in a recipe will be required for a target party size. The first inputs to the program will be the recipe itself Here is an example recipe that comes from the story "Chitty Chitty Bang Bang", written by lan Fleming, who is much better known for introducing the world to James Bond This is a recipe scaler for serving large crowds! Enter one ingredient per line, with a numeric value first. Indicate the end of input with an empty line 4 tbsp cocoa 1/4 pound butter 2 tsp corn syrup 1 can evaporated milk 1 tsp water Here is the recipe that has been recorded 4 tbsp 1/4 pound butter 2 tsp 1 Can 1 tsp cocoa corn syrup evaporated milk water How many does this recipe serve? 16 How many people must be served? 25 Multiplying the recipe by 2 8 tbsp 2/4 pound butter 4 tsp 2 Can 2 tsp cocoa corn syrup evaporated milk water Serves 32

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions