Home / Expert Answers / Computer Science / python-problem-write-a-program-that-prompts-for-and-reads-strings-until-a-string-that-starts-with-pa407

(Solved): Python Problem: Write a program that prompts for and reads strings until a string that starts with ...



Python

Problem: Write a program that prompts for and reads strings until a string that starts with the letter “A” is entered (inclusive), then prints the longest string that was entered.  Sample run:

Enter a string: Jaypher said, ’It’s safer

Enter a string: you’ve lemons in your head;

Enter a string: First to eat, a pound of meat, 

Enter a string: Find then to go at once to bed.

Enter a string: Eating meat is half the battle, 

Enter a string: Will you hear the Lemons rattle!

Enter a string: If you don’t, you’ll always moan,

Enter a string: In a Lemoncolly tone;

Enter a string: For there’s nothing half so dreadful,

Enter a string: As Lemons in your head.

Longest was: 'For there’s nothing half so dreadful,'



We have an Answer from Expert

View Expert Answer

Expert Answer


# please leave comment for any doubt # creating an empty list used to store strings entered by the user sentences
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe