+ 1
Can you help me?
Hi. I want to write a program that takes a string from the user, then gives the longest subroutine with the most repetition as output. And if two subfields are found that are the same in terms of repetition and height, the one that is alphabetically later should be used as the output. I have no idea about the question. Can you help me? For example: Input: poslpos Output: pos
3 Respostas
+ 1
Frist u need to define the characteristics of ur subroutine.....
Then work from there
+ 1
Marjaf You referenced python in your tag so what do you need to do in python to accomish the task?
So break it down into pieces. First you need a string to store input. Second you need to take input.
myString = input()
What you describe above sound like one of the Sololearn code projects/challenges. Generally the lessons before each give you the tools to complete the task. So you can go back and review them to build your solution.
You can also Google "how to declare a string in python" and "how to take input in python"
Then continue the process. I assume you meant substring and not subroutine. So next review the Sololearn lessons on string handling or search on Google for "find substring in python"
Then keep working through each item needed to complete the code.
Jump in you can do it! And happy coding! 😊