Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

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

Making Hard Decisions with decision tools

Authors: Robert Clemen, Terence Reilly

3rd edition

538797576, 978-0538797573

More Books

Students also viewed these Mathematics questions

Question

What is factory gate pricing?

Answered: 1 week ago