subject

Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value)) (1) Prompt the user for the number of cups of lemon juice, water, and agave nectar needed to make lemonade. Prompt the user to specify the number of servings the recipe yields. Output the ingredients and serving size. (Submit for 2 points).
Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below, the user's input value is shown on the next line, but such values don't actually appear as output when the program runs.
Enter amount of lemon juice (in cups):
2
Enter amount of water (in cups):
16
Enter amount of agave nectar (in cups):
2.5
How many servings does this make?
6
Lemonade ingredients - yields 6.00 servings
2.00 cup(s) lemon juice
16.00 cup (s) water
2.50 cup (s) agave nectar
(2) Prompt the user to specify the desired number of servings. Adjust the amounts of each ingredient accordingly, and then output the ingredients and serving size. (Submit for 4 points, so 6 points total).
How many servings would you like to make?
48
Lemonade ingredients - yields 48.00 servings
16.00 cup (s) lemon juice
128.00 cup (s) water
20.00 cup (s) agave nectar
(3) Convert the ingredient measurements from (2) to gallons. Output the ingredients and serving size. Note: There are 16 cups in a gallon. (Submit for 2 points, so 8 points total).
Lemonade ingredients - yields 48.00 servings
1.00 gallon(s) lemon juice
8.00 gallon (s) water
1.25 gallon(s) agave nectar

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 18:30, trevorhenyan51
Dereck works for long hours on his computer.  he frequently experiences physical strain by the end of the day because he does not follow an important rule of ergonomics with respect to the use of keyboards.  which of the following actions of dereck could lead to physical strain? a.  placing the keyboard exactly in front of him while typingb.  keeping hands and wrists straight while typingc.  using wrist pads throughout the dayd.  pounding at the keys on the keyboard while typinge.  resting his hands on the keyboard when he is not typing
Answers: 1
image
Computers and Technology, 24.06.2019 21:30, shunna33
How is a wan different than a lan? both connect computers, but only wan users don’t need the same operating system. both are peer-to-peer networks, but only a wan requires networking hardware. both network computers, but only a wan can cover larger geographical ranges. both connect computers to the internet, but only wan connects to the cloud.
Answers: 1
image
Computers and Technology, 25.06.2019 07:50, joshbee2014
Assignment: permutations use the permutation formula   r ! ! n n p nr   to solve each problem. be sure to show all work leading to your answer. part i: solve real-world permutation problems choose any four (4) of the following five problems to solve. for each problem a) show how the permutation formula can be used to find the answer and b) write a sentence to explain the meaning of the answer for the situation. 1. to register for online banking services at a local credit union, you need to select a four-digit personal identification number, or pin code. the digits cannot be repeated. how many ways are there to arrange four digits out of the numerals 0 through 9 to create a code?
Answers: 3
image
Computers and Technology, 25.06.2019 12:00, only1cache
What are the best ways to find data within a spreadsheet or database? check all that apply. sorting tools the function scrolling the search engine the search box
Answers: 1
You know the right answer?
Output each floating-point value with two digits after the decimal point, which can be achieved as f...

Questions in other subjects:

Konu
Mathematics, 11.10.2020 14:01