Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Read strings fav _ fruit and least _ fav _ fruit from input. Output the following: ' My favorite fruit' followed by fav _ fruit,
Read strings favfruit and leastfavfruit from input. Output the following:
My favorite fruit' followed by favfruit, then 'has' followed by the length of favfruit, then 'characters', all separated by spaces.
My least favorite fruit' followed by leastfavfruit, then 'has' followed by the length of leastfavfruit, then 'characters', all separated by spaces.
Click here for example
Ex: If the input is:
apple
pear
then the output is:
My favorite fruit apple has characters
My least favorite fruit pear has characters
Note: print a b c outputs variables a b and c separated by spaces in one line.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started