Answer to Question #280254 in Python for kika

Question #280254

For each function, describe what it actually does when called with a string argument. If it does not correctly check for lowercase letters, give an example argument that produces incorrect results, and describe why the result is incorrect.

# 3

def any_lowercase3(s):

   for c in s:

     flag = c.islower()

   return flag


1
Expert's answer
2021-12-20T10:07:29-0500
def any_lowercase3(s):
    for c in s:                            # Draws output at the last character
        flag = c.islower()
    return flag

# Returns true only in the last character is lower.

. The function takes the given string, checks if it is in lowercase and passes the results (true or false) to the flag variable which the function returns


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS