Question: 4.2 Problem 1 (1 mark) Problem: Write a program that prompts for and reads strings until an empty string is entered, then prints the longest

4.2 Problem 1 (1 mark) Problem: Write a program that prompts for and reads strings until an empty string is entered, then prints the longest string that was entered. The output must match the punctuation in this example exactly (with quote marks). $ python3 Longest . py Enter a string: Mrs Jaypher said, 'It's safer Enter a string: If you've lemons in your head; Enter a string: First to eat, a pound of meat, Enter a string: And then to go at once to bed. Enter a string: Eating meat is half the battle, Enter a string: Till you hear the Lemons rattle! Enter a string: If you don't, you'll always moan, Enter a string: In a Lemoncolly tone
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
