Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A company's security team has asked employees to change their password for all the applications / software they are using each quarter for security reasons.

A company's security team has asked employees to change their password for all the applications/software they are using each quarter for security reasons.
You are asked to create software that takes employee input as a list of passwords and checks if each password is strong or not. If a password is strong, the
software shows 'true'. If a password is not strong it shows 'false'.
A password is considered strong if the below conditions are satisfied:
It has at least 8 characters.
It concains at least one lowercase letter.
It concains at least one uppercase letter.
It contains at least one digit.
It does not contain 2 of the same characters in adjacent positions (i.e. "aab" violates this condition, but "aba" does not).
Write an algorithm to print 'ue' for each strong password and 'false' for each password that is not strong, from the given list of passwords.
Input
The first line of input consists of an integer- password_size, representing the number of applications/software that are being used by the employee (N).
The next line consists of N space-separated string representing the passwords for the applications/software.
Output
Print N space-separated strings consisting of 'true' if the password is strong and 'false' if it is not strong.
Example
Input:
4
paSu121i pasWord8476# @996ystA4 pA$$
Outpuc
true true false false
Explanation:
"pA5s") are not strong passwords, as "G96ystA4" contains only 7 characters and "pA$5" doesn't contain any digits and only has 4 characters.
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

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

Students also viewed these Databases questions