Question: python program In this exercise you will develop a small module consisting of four helping functions. All the functions have a unique argument word, and
In this exercise you will develop a small module consisting of four helping functions. All the functions have a unique argument word, and they return True or False. The functions are: - hasLower (word): 'returns true if the word has lower case letters' - hasUpper (word): 'returns true if the word has upper case letters' - hasDigit(word): 'returns true if the word has digits' - hasSpecial(word): 'returns true if the word has special characters' The functions are self explanatory, the only missing information is that special characters in this exercises are considered to be : " !@\# $%&() _" Define global constants for lower case, upper case, digits and special characters and write the code of these four functions. These functions are useful in checking passwords for example. You can test that they are correctly working by trying the below assert statements: assert hasLower ("SuperP@55word")==True assert hasUpper ("SuperP@55word") ==True assert hasDigit ("SuperP@55word")==True assert hasspecial ("SuperP@55word")==True assert hasLower ( "SUPERP@55WORD") = False assert hasUpper( "superp@55word") == False assert hasDigit( "SuperPQssword") ==F False assert hasspecial ("Superpa55word") = False
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
