Question: Assign variable fav _ drink with 'coffee' and read string least _ fav _ drink from input. Output the following: ' My favorite drink' followed

Assign variable fav_drink with 'coffee' and read string least_fav_drink from input. Output the following:
'My favorite drink' followed by fav_drink, then 'has' followed by the length of fav_drink, then 'characters', all separated by spaces.
'My least favorite drink' followed by least_fav_drink, then 'has' followed by the length of least_fav_drink, 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 6 characters
My least favorite drink soda has 4 characters
Note: print(a, b, c) outputs variables a, b, and c separated by spaces in one line.
print('My least favorite drink', least_fav_drink, 'has', len(least_fav_drink), 'characters')

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