Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem # 5 : Password Strength Calculator Complete function password _ strength, which takes in one parameter, password, and returns the strength of that password

Problem #5: Password Strength Calculator
Complete function password_strength, which takes in one parameter, password, and returns the strength of that password (as an integer score). password is a string made up of determine the score are as follows:
\table[[Feature,Points it is Worth]]
\table[[Starts with a special character,+30],[Starts with an uppercase letter,+25],[Starts with a digit,+20],[Each letter after index 10,+5],[\table[[Each lowercase letter at or before index 10, including the starting],[character]],+2],[Each digit at or before index 10, including the starting character,+12],[Each digit after index 10,+10],[\table[[Each special character at or t-fore index 10, including the starting],[character]],+5],[Each special character after index 10,+15]]
\table[[Function Call,Expected Return Value],[password_strength(f^AAcG'),9],[password_strength('t|X'),4],[password_strength(W63UtHTuN'),53],[password_strength(falkjsdfol8237'),62],[password_strength('Msq08#2w&GpMm'),89],[password_strength('qHJTtgYQ'),18],[password_strength('gw74X512'),52],[password_strength('89@%B9T(JZJ'),76],[password strength(y**n(q%xxvvp2'),37],[password_strength('Ifxus34alksdfo(4'),115]]
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions