Question: IN PYTHON CODE :: Please i need answer to each part. A website administrator wants to ensure maximum security for its users. For that purpose,
IN PYTHON CODE ::
Please i need answer to each part.
A website administrator wants to ensure maximum security for its users. For that purpose, he decides to make an application which evaluates the strength of the passwords of the different users of the site, knowing that a password is a string of characters which does not include spaces. The strength of a password varies, depending on the value of a calculated score, from 'Very weak' to 'Very strong': If the score <20, the strength of the password is' Very weak' Otherwise if the score <40, the strength of a password is' Weak' Otherwise, if the score <80, the strength of the password is' Strong' Otherwise the strength of the password is' Very strong' The score is calculated by adding bonuses. The bonuses awarded are: Total number of characters * 4 (Total number of characters - number of capital letters) * 2 (Total number of characters - number of letters lowercase) * 3 Number of non-alphabetic characters * 5 1- Write a function lowerletters that calculates the number of lower letters in the password. 2- Write a function upperletters that calculates the number of capital letters in the password. 3- Write a function passnonalpha that calculates the number of non-alphabetical characters in the password 4- Write a function score that calculates the total score of the password and returns its strength. 5- Write a main program, that takes as input a given password and calculates and prints its strength 6- Ensure that the main program will not run if the file containing your solution is imported into another program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
