Question: Invalid date nullo, 0 , 0 , 0 F - min: 4 Latest submission - Invalid date on Invalid date Total score: 0 / 8
Invalid date nullo, min:
Latest submission Invalid date on Invalid date
Total score:
Only show failing tests
Download this submission
: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 servings
cups lemon juice
cups 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 servings
cups lemon juice
cups water
cups 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 servings
cups lemon juice
cups water
cups agave nectar
How many servings would you like to make?
Lemonade ingredients yields servings
cups lemon juice
cups water
cups 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 servings
cups lemon juice
cups water
cups agave nectar
How many servings would you like to make?
Lemonade ingredients yields servings
cups lemon juice
cups water
cups 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 servings
cups lemon juice
cups water
cups agave nectar
How many servings would you like to make?
Lemonade ingredients yields servings
cups lemon juice
cups agave nectarOutput is nearly correct, but whitespace differs. See highlights below.
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 servings
cups lemon juice
cups water
cups agave nectar
How many servings would you like to make?
Your output
Lemonade ingredients yields servings
cups lemon juice
cups water
cups agave nectar
Lemonade ingredients yields servings
gallons lemon juice
gallons 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 servings
cups lemon juice
cups water
cups agave nectar
Expected output
How many servings would you like to make?
Lemonade ingredients yields servings
cups lemon juice
cups agave nectar
Lelemonjuicecups floatinputEnter amount of lemon juice in cups:
watercups floatinputEnter amount of water in cups:
agavenectarcups floatinputEnter amount of agave nectar in cups:
initialservings floatinputHow many servings does this make?
#Output the initial serving information
printfLemonade ingredients yields initialservings:f servings"
printflemonjuicecups: f cups lemon juice"
printfwatercups:f cups water"
printfagavenectarcups:f cups agave nectar"
#Step : Ask the user for the desired number of servings
desiredservings floatinputHow many servings would you like to make?
multiplier desiredservings initialservings
#Adjust the ingredient amounts
adjustedlemonjuice lemonjuicecups multiplier
adjustedwater watercups multiplier
adjustedagavenectar agavenectarcups multiplierprintf
Lemonade ingredients yields desiredservings:f servings"
printfadjustedlemonjuice:f cups lemon juice"
printfadjustedwater:f cups water"
printfadjustedagavenectar:f cups agave nectar"
#Step : Convert the final ingredient amounts from cups to gallons
lemonjuicegallons adjustedlemonjuice
watergallons adjustedwater
agavenectargallons adjustedagavenectar
#Output the final amounts in gallons
printf
Lemonade ingredients yields desiredservings:f servings"
printflemonjuicegallons:f gallons lemon juice"
printfwatergallons:f gallons water"
printfagavenectargallons:f gallons agave nectar"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
