1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
MrRissso [65]
2 years ago
8

In this exercise, you are asking the user to set a alpha numeric password for any website. Put some conditions.

Computers and Technology
1 answer:
AveGali [126]2 years ago
7 0

Answer:

The program in Python is as follows:

print("Create your password which must have these.\nMust be 8 characters long.\nAt least one uppercase letter.\nAt least one number.")

pwd = input("Enter your password: ")

chkLength = 0; chkUpper = 0; chkLower = 0; chkDigit = 0

if len(pwd) == 8:

   chkLength = 1

if (any(x.isupper() for x in pwd)):

   chkUpper = 1

if any(y.islower() for y in pwd):

   chkLower = 1

if any(z.isdigit() for z in pwd):

   chkDigit = 1

if chkLength == 1 and chkUpper == 1 and chkLower == 1 and chkDigit == 1:

   print("You have set the correct password.")

else:

   print("Your password doesn't meet the criteria.")

   if chkLength == 0:

       print("It's not 8 characters long correct size.")

   if chkDigit == 0:

       print("Digit is missing.")

   if chkLower == 0:

       print("Lowercase is missing.")

   if chkUpper == 0:

       print("Uppercase is missing.")

Explanation:

This prints the instruction

print("Create your password which must have these.\nMust be 8 characters long.\nAt least one uppercase letter.\nAt least one number.")

This prompts the user for password

pwd = input("Enter your password: ")

This initializes check variables to 0 (0 - false)

chkLength = 0; chkUpper = 0; chkLower = 0; chkDigit = 0

If password length is 8

if len(pwd) == 8:

Set check variable of length to 1 (1 - true)

   chkLength = 1

If password has uppercase

if (any(x.isupper() for x in pwd)):

Set check variable of uppercase to 1

   chkUpper = 1

If password has lowercase

if any(y.islower() for y in pwd):

Set check variable of lowercase to 1

   chkLower = 1

If password has digit

if any(z.isdigit() for z in pwd):

Set check variable of digits to 1

   chkDigit = 1

If all check variables is 1, then the password is correct

<em>if chkLength == 1 and chkUpper == 1 and chkLower == 1 and chkDigit == 1: </em>

<em>    print("You have set the correct password.") </em>

If otherwise,

else:

The password is incorrect

   print("Your password doesn't meet the criteria.")

The following prints the corresponding criteria that is not met, depending on the value of its check variable

 <em>  if chkLength == 0: </em>

<em>        print("It's not 8 characters long correct size.") </em>

<em>    if chkDigit == 0: </em>

<em>        print("Digit is missing.") </em>

<em>    if chkLower == 0: </em>

<em>        print("Lowercase is missing.") </em>

<em>    if chkUpper == 0: </em>

<em>        print("Uppercase is missing.")</em>

You might be interested in
Assume that name has been declared suitably for storing names (like "Amy", "Fritz" and "Moustafa"). Assume also that stdin is a
aniked [119]

Answer:

void main(){

string name;

printf("Enter Name\n");

stdin("%s",&name);

Printf("\nGreetings %s",name);

}

Explanation:

Here scanf is represented by stdin and we are using that scanner object to read the string value from user.The value which we read are printed in a new line using printf .The format specifier %s in printf is replaced by name variable

3 0
3 years ago
An algorithm to display multiplication table a number up to 12​
kkurt [141]

Explanation:

Explanation:They are

Explanation:They are 1) start the process

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 10

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 104) print M = N*T

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 104) print M = N*T5) End for

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 104) print M = N*T5) End for6) Stop the process

4 0
2 years ago
After a hard rain, water flows faster in a local creek. This washes away a lot of sediment, making the creek a little deeper.
notka56 [123]
B. The Grand Canyon 
Got this of a Study Island test.  Good Luck!
6 0
3 years ago
Identify the components of the enveloped virus budding process
Elina [12.6K]

The components of the enveloped virus budding process are:

  • lipid bilayers
  • fission event
  • Glycosylated (trans-) membrane proteins.

<h3>What is the case of the virus about?</h3>

Virus budding in general is known to be a term that connote the scattering or disturbance of a cellular membrane and it is one away from the cytoplasm.

Note that it is said to be the envelopment of the viral capsid and this is done by one or more lipid bilayers that can be seen in the viral membrane glycoproteins, and it is one where a fission event takes place.

Hence The components of the enveloped virus budding process are:

  • lipid bilayers
  • fission event
  • Glycosylated (trans-) membrane proteins.

Learn more about virus from

brainly.com/question/26128220

#SPJ1

3 0
1 year ago
Virtual Memory involves swapping between which 2 devices?
Darina [25.2K]

Answer:

Ram and the hard drive

Explanation:

A page of RAM is written to the harddisk and read back when it is needed again. That way it may seem you have more RAM than you actually have, at the cost of performance of course.

6 0
3 years ago
Other questions:
  • In doing a load of clothes, a clothes drier uses 18 A of current at 240 V for 59 min. A personal computer, in contrast, uses 3.0
    7·1 answer
  • To go to a specific cell, press the function key
    9·1 answer
  • In which career field would the computing technology industry associations compTIA A+ certification be useful
    6·1 answer
  • Benjamin recently issued new mobile phones to the marketing team at his company. Each phone can transmit encrypted information f
    8·1 answer
  • Suppose we have a linearly separable dataset, and we divide the data into training and validation sets. Will a perceptron learne
    8·1 answer
  • In 2011 a program named Watson running on an IBM supercomputer
    12·1 answer
  • _____________________________________________________is a pre-designed format to help users with the creation of a document, lik
    6·1 answer
  • There are parallels between the trust models in Kerberos and Public Key Infrastructure (PKI). When we compare them side by side,
    15·1 answer
  • How to shutdown a computer by step by step​
    5·2 answers
  • Jazmine just finished setting up an operating system that's designed to work between a VM guest OS and computer hardware. What i
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!