Question: Assign variable fav _ drink with 'coffee' and read string least _ fav _ drink from input. Output the following: ' My favorite drink' followed
Assign variable favdrink with 'coffee' and read string leastfavdrink from input. Output the following:
My favorite drink' followed by favdrink, then 'has' followed by the length of favdrink, then 'characters', all separated by spaces.
My least favorite drink' followed by leastfavdrink, then 'has' followed by the length of leastfavdrink, then 'characters', all separated by spaces.
Click here for example
Ex: If the input is soda, then the output is:
My favorite drink coffee has characters
My least favorite drink soda has characters
Note: printa b c outputs variables a b and c separated by spaces in one line.
printMy least favorite drink', leastfavdrink, 'has', lenleastfavdrink 'characters'
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
