Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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_2

Step: 3

blur-text-image_3

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

Advances In Databases And Information Systems Second East European Symposium Adbis 98 Poznan Poland September 1998 Proceedings Lncs 1475

Authors: Witold Litwin ,Tadeusz Morzy ,Gottfried Vossen

1st Edition

3540649247, 978-3540649243

More Books

Students also viewed these Databases questions

Question

What are some of the possible scenes from our future?

Answered: 1 week ago