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
Is a Mazda RX7 rotary?​
bagirrra123 [75]

Answer:

Mazda RX-7. The Mazda RX-7 is a front-engine, rear-wheel-drive rotary engine powered sports car manufactured and marketed by Mazda from 1978–2002 across three generations—all noted for using a compact, lightweight Wankel rotary engine.

4 0
3 years ago
Frames control what displays on the Stage, while keyframes help to set up
pogonyaev

Answer: A keyframe is a location on a timeline which marks the beginning or end of a transition. So for example, you have a movie and it transitions to another scene, keyframes tell it when and where to start the transition then when and where to stop the transition.

3 0
2 years ago
_ includes websites that encourage interaction and connection among people, businesses, and organizations. A. News sites B. Sear
Dovator [93]
> News sites give information about news or what is trending around the area or world (CNN, Fox, MSNBC, etc) 

> Search engines is what allows you to look up websites (Google, Bing, Yahoo, etc) 

> Social media AKA Social Networking sites is interaction social sites where you connect with various people from around the world. (Facebook, Twitter, Google+, etc)

>Apps is short for applications which is an application that has a specific function (Games, Music, Social networking) 

So based on this, you answer is C. Social Media
6 0
3 years ago
Read 2 more answers
Key physical database design decisions typically do not include: A) choosing the storage format for each attribute from the logi
7nadin3 [17]

Answer: B) conducting requirements structuring.

Explanation:

The Key physical database design decisions usually include: deciding on the storage format as well as physical storage that makes access to database more efficient, design practices which aid quick retrieval, and attributes grouping into physical records. So the following are key design decisions but conducting requirements structuring is not.

A) choosing the storage format for each attribute from the logical database model.

C) arranging related records in secondary memory so that individual and groups of records can be stored, retrieved, and updated rapidly.

D) selecting media and structures for storing data to make access more efficient.

E) grouping attributes from the logical database model into physical records

4 0
2 years ago
Determining which computer platform (operating system) would be best for a particular student often depends on what the student
leva [86]

Answer: Window OS

Explanation:

Based on the information given, it should be noted that the students who plan to study graphic design should consider the Window OS platform since it is considered to be the industry standard in those fields.

Microsoft Windows, also refered to as the Windows OS, is a computer operating system that's developed by Microsoft to run personal computers. It has the first graphical user interface and also, the Windows OS dominates the personal computer market.

4 0
2 years ago
Other questions:
  • 5. What would the browser display if the following code were executed in a script?a var product = 0; while ( product &lt;= 25 );
    8·1 answer
  • When uninstalling software, it is best to delete the folder containing the software?
    11·1 answer
  • What is an active cooling solution for a PC?
    10·2 answers
  • Convert (35.125)10 to binary
    9·1 answer
  • which is the quickest way to change the font color in multiple, randomly located cells in a worksheet?
    6·2 answers
  • Technician A says that a system should be recharged with refrigerant until the condenser temperature is equal to the ambient tem
    9·1 answer
  • The ____ auto fill option that fills the destination area using the format of the source area; no content is filled.
    12·1 answer
  • 15 points: Which type of system is used to capture and leverage the decision-making abilities of human experts?
    5·1 answer
  • Joe a frequent visitor to a branch office attempts to connect his tablet to the office wireless network but is unable to connect
    14·1 answer
  • with the advent of technology one can experience special features such as 3D theater experiences true or false
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!