Question: Invalid date nullo, 0 , 0 , 0 F - min: 4 Latest submission - Invalid date on Invalid date Total score: 0 / 8

Invalid date nullo, 0,0,0F-min:4
Latest submission - Invalid date on Invalid date
Total score: 0/8
Only show failing tests
Download this submission
1:Compare output
Output differs. See highlights below.
Special character legend
Your output starts
with
Expected output
Enter amount of lemon juice (in cups):
Enter amount of water (in cups):
Enter amount of agave nectar (in cups):
How many servings does this make?
Lemonade ingredients - yields 6.00 servings
2.00 cup(s) lemon juice
2.50 cup(s) agave nectar
H
Enter amount of lemon juice (in cups):
Enter amount of water (in cups):
Enter amount of agave nectar (in cups):
How many servings does this make?
starts with
Lemonade ingredients - yields 6.00 servings
2.00 cup(s) lemon juice
16.00 cup(s) water
2.50 cup(s) agave nectar Output differs. See highlights below.
Your output starts
with
Expected output
starts with
Enter amount of lemon juice (in cups):
Enter amount of water (in cups):
Enter amount of agave nectar (in cups):
How many servings does this make?
Lemonade ingredients - yields 6.00 servings
2.00 cup(s) lemon juice
16.00 cup(s) water
2.50 cup(s) agave nectar
How many servings would you like to make?
Lemonade ingredients - yields 48.00 servings
16.00 cup(s) lemon juice
128.00 cup(s) water
20.00 cup(s) agave nectar
L
Enter amount of lemon juice (in cups):
Enter amount of water (in cups):
Enter amount of agave nectar (in cups):
How many servings does this make?
Lemonade ingredients - yields 6.00 servings
2.00 cup(s) lemon juice
16.00 cup(s) water
2.50 cup(s) agave nectar
How many servings would you like to make?
Lemonade ingredients - yields 48.00 servings
16.00 cup(s) lemon juice
128.00 cup(s) water
20.00 cup(s) agave nectar Output differs. See highlights below.
Special character legend
Your output starts
with
Expected output
starts with
Enter amount of lemon juice (in cups):
Enter amount of water (in cups):
Enter amount of agave nectar (in cups):
How many servings does this make?
Lemonade ingredients - yields 6.00 servings
2.00 cup(s) lemon juice
16.00 cup(s) water
2.50 cup(s) agave nectar
How many servings would you like to make?
Lemonade ingredients - yields 3.00 servings
1.00 cup(s) lemon juice
1.25 cup(s) agave nectarOutput is nearly correct, but whitespace differs. See highlights below.
|2
Enter amount of lemon juice (in cups):
Enter amount of water (in cups):
Enter amount of agave nectar (in cups):
How many servings does this make?
Lemonade ingredients - yields 6.00 servings
2.00 cup(s) lemon juice
16.00 cup(s) water
2.50 cup(s) agave nectar
How many servings would you like to make?
Your output
Lemonade ingredients - yields 48.00 servings
16.00 cup(s) lemon juice
128.00 cup(s) water
20.00 cup(s) agave nectar
Lemonade ingredients - yields 48.00 servings
1.00 gallon(s) lemon juice
1.25 gallon(s) agave nectar
Enter amount of lemon juice (in cups):
Enter amount of water (in cups):
Enter amount of agave nectar (in cups):
How many servings does this make?
Lemonade ingredients - yields 6.00 servings
2.00 cup(s) lemon juice
16.00 cup(s) water
2.50 cup(s) agave nectar
Expected output
How many servings would you like to make?
Lemonade ingredients - yields 48.00 servings
16.00 cup(s) lemon juice
20.00 cup(s) agave nectar
Lelemon_juice_cups = float(input('Enter amount of lemon juice (in cups):
'))
water_cups = float(input('Enter amount of water (in cups):
'))
agave_nectar_cups = float(input('Enter amount of agave nectar (in cups):
'))
initial_servings = float(input('How many servings does this make?
'))
#Output the initial serving information
print(f"Lemonade ingredients - yields {initial_servings:.2f} servings")
print(f"{lemon_juice_cups: 2f} cup(s) lemon juice")
print(f"{water_cups:.2f} cup(s) water")
print(f"{agave_nectar_cups:.2f} cup(s) agave nectar")
#Step 2: Ask the user for the desired number of servings
desired_servings = float(input('How many servings would you like to make?
'))multiplier = desired_servings / initial_servings
#Adjust the ingredient amounts
adjusted_lemon_juice = lemon_juice_cups * multiplier
adjusted_water = water_cups * multiplier
adjusted_agave_nectar = agave_nectar_cups * multiplierprint(f"
Lemonade ingredients - yields {desired_servings:.2f} servings")
print(f"{adjusted_lemon_juice:.2f} cup(s) lemon juice")
print(f"{adjusted_water:.2f} cup(s) water")
print(f"{adjusted_agave_nectar:.2f} cup(s) agave nectar")
#Step 3: Convert the final ingredient amounts from cups to gallons
lemon_juice_gallons = adjusted_lemon_juice /16
water_gallons = adjusted_water /16
agave_nectar_gallons = adjusted_agave_nectar /16
#Output the final amounts in gallons
print(f"
Lemonade ingredients - yields {desired_servings:.2f} servings")
print(f"{lemon_juice_gallons:.2f} gallon(s) lemon juice")
print(f"{water_gallons:.2f} gallon(s) water")
print(f"{agave_nectar_gallons:.2f} gallon(s) agave nectar")
Invalid date nullo, 0 , 0 , 0 F - min: 4 Latest

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