Question: Python This is an exercise in coding with some repetition, with some output formatting and if-statements thrown in. Problem Description Many recipes tend to be

 Python This is an exercise in coding with some repetition, with

Python

This is an exercise in coding with some repetition, with some output formatting and if-statements thrown in. Problem Description 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 miik 1 tsp water Here is the recipe that has been recorded 4 tbsp 1/4 pound butter 2 tsp 1 can 1 tsp 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 corn syrup evaporated milk water Serves 32

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 Databases Questions!