# Each of the following intends to check # whether a string contains any lowercase letters. # # Decide whether each one is correct or not. # It is good practice to learn to figure this out without # executing/testing them in Python. # READ the code and analyze it. def any_lowercase1(s): for c in s: if c.islower(): return True else: return False def any_lowercase2(s): for c in s: if 'c'.islower(): return 'True' else: return 'False' def any_lowercase3(s): for c in s: flag = c.islower() return flag def any_lowercase4(s): flag = False for c in s: flag = (flag or c.islower()) return flag def any_lowercase5(s): for c in s: if not c.islower(): return False return True