Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

Different formulas for mathematical core areas.

Answered: 1 week ago

Question

2. How will the team select a leader?

Answered: 1 week ago