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
Studentka2010 [4]
3 years ago
9

You will write a function that determines if a password is "strong" or "weak". Your function willhave one parameter, the passwor

d given as a string, and return the string "strong" or "weak"depending on the password. A password is strong only if it meets ALL of these criteria:1.It is 8 or more characters long2.It contains a digit (0-9)3.It contains an uppercase letter (A-Z)4.It contains a lowercase letter (a-z)5.It contains one of these five special characters "@*&$!"
Engineering
1 answer:
madreJ [45]3 years ago
7 0

Answer:

def checkStrength(password):

   lower = False

   upper = False

   digit = False

   length = False

   characters = False

   chars = ["@", "*", "&", "$", "!"]

   if len(password) < 8:

       length = False

   else:

       length = True

   for c in password:

       if c.isdigit():

           digit = True

       if c.islower():

           lower = True

       if c.isupper():

           upper = True

       if c in chars:

           characters = True

   if lower and upper and digit and length and characters:

       return "Strong"

   else:

       return "Weak"

print(checkStrength("[email protected]"))

end

You might be interested in
Define Viscosity. What are the main differences between viscous and inviscid flows?
Evgesh-ka [11]

1. Define <em>Viscosity</em>

In physics, <em>Viscosity</em> refers to the level of resistance of a fluid to flow due to internal friction, in other words, viscosity is the result of the magnitude of internal friction in a fluid, as measured by the force per unit area resisting uniform flow. For example, the honey is a fluid with high viscosity while the water has low viscosity.

What are the main differences between viscous and inviscid flows?

Viscous flows are flows that has a thick, sticky consistency between solid and liquid, contain and conduct heat, does not have a rest frame mass density and whose motion at a fixed point always remains constant. Inviscid flows, on the other hand, are flows characterized for having zero viscosity (it does not have a thick, sticky consistency), for not containing or conducting heat, for the lack of steady flow and for having a rest frame mass density

Furthermore, viscous flows are much more common than inviscid flows, while this latter is often considered an idealized model since helium is the only fluid that can become inviscid.

5 0
3 years ago
A steam power plant is represented as a heat engine operating between two thermal reservoirs at 800 K and 300 K. The temperature
Sergeeva-Olga [200]
Yeet is the answer .....
4 0
2 years ago
It is appropriate to use the following yield or failure criterion for ductile materials (a) Maximum shear stress or Tresca crite
Nataly [62]

Answer:

(b)Distortion energy theory.

Explanation:

The best suitable theory for ductile material:

       (1)Maximum shear stress theory (Guest and Tresca theory)

It theory state that applied maximum shear stress should be less or equal to its maximum shear strength.

      (2)Maximum distortion energy theory(Von Mises henkey's        theory)

It states that maximum shear train energy per unit volume at any point  is equal to strain energy per unit volume under the state of uni axial stress condition.

But from these two Best theories ,suitable theory is distortion energy theory ,because it gives best suitable result for ductile material.

6 0
3 years ago
Suggest appropriate materials for a cylinder head and give four reason for your choice​
ycow [4]

Answer:

head and give four reason for your choice

7 0
3 years ago
A wire is 0.92 m long and 1.2 mm2 in cross-sectional area. It carries a current of 5.0 A when a 2.2 V potential difference is ap
Flura [38]

The solution is in the attachment

3 0
3 years ago
Other questions:
  • Please help me with this question​
    8·1 answer
  • a vehicle is in her repair with a complaint at for heating output during testing and diagnosing air is found to be trapped in th
    15·1 answer
  • In highways the far left lane is usually the _____
    11·2 answers
  • Why why why why why why why
    7·2 answers
  • 10. Power = (Distance * Force) / Time
    7·1 answer
  • The formation of faults in Earth's crust is an effect. What causes faults to form in the crust? Global Positioning System sensor
    9·1 answer
  • A furnace uses preheated air to improve its fuel efficiency. Determine the adiabatic flame temperature when the furnance is oper
    13·1 answer
  • (CO 3) A nonrecursive filter may best be described as _____. Group of answer choices a filter whose current output depends on pa
    13·1 answer
  • 1. Explain the term engine<br>compression​
    10·2 answers
  • What is considered the greatest engineering achievement of the 20th century?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!