[Solved] Split string on capital letter and a capital letter followed by a lowercase letter [closed]

I’m trying to give an answer that will help you understanding the problem and work on the solution. You have a string with capital letters and at some point there is a small letter. You want the string to be split at the position before the first small letter. You can iterate through the string … Read more

[Solved] Why doesn’t if, elif or else work with .lower() in Python? [closed]

You need to call the method: month.lower() == ‘march’ The method is an object too, and without calling it you are comparing that method with a string. They’ll never be equal: >>> month=”January” >>> month.lower <built-in method lower of str object at 0x100760c30> >>> month.lower == ‘January’ False >>> month.lower == ‘january’ False >>> month.lower() … Read more

[Solved] How to check if there are 2 upper case letters, 3 lower case letters, and 1 number in JAVA

This looks like a homework question so I won’t solve it directly. However here are some steps you could take: Create a method to validate the input (public static boolean isValid(String str)) Convert the String to a character Array. (There’s a method for that!) Iterate over the letters and keep track of how many upper … Read more