Thursday
October 23, 2014

Homework Help: Computer Programming using python

Posted by Anonymous on Thursday, October 24, 2013 at 10:28am.

Assume s is a string of lower case characters.

Write a program that prints the longest substring of s in which the letters occur in alphabetical order. For example, if s = 'azcbobobegghakl', then your program should print

Longest substring in alphabetical order is: beggh
In the case of ties, print the first substring. For example, if s = 'abcbcd', then your program should print

Longest substring in alphabetical order is: abc
For problems such as these, do not include raw_input statements or define the variable s in any way. Our automating testing will provide a value of s for you - so the code you submit in the following box should assume s is already defined. If you are confused by this instruction, please review L2 Problems 10 and 11 before you begin this problem set.

Note: This problem is fairly challenging. We encourage you to work smart. If you've spent more than a few hours on this problem, we suggest that you move on to a different part of the course. If you have time, come back to this problem after you've had a break and cleared your head.

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Computer Programming using python - Assume s is a string of lower case ...
Computer Programming using python - Assume s is a string of lower case ...
Python programming Language - Assume S is a string of lower case characters. ...
C++ programming computer - I'm having some trouble trying to program these ...
programming - Assume s is a string of lower case characters. Write a program ...
Computer Science - Suppose that a String variable str has already been defined ...
computer programming - Assume that there are n tyres that could be used by car, ...
Programming in c++ - Draw a flow-chart and Write a program that asks the user ...
programming - 1. Assume there are n-tyres that could be used by car, tricycle ...
programming - I am having trouble writing this program for java. can anybody ...

Search
Members