Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Challenge: Validate Strong Passwords | Advanced Regular Expressions and Applications
Python Regular Expressions

bookChallenge: Validate Strong Passwords

To practice applying advanced regular expression techniques, you will create a password validator that checks if a password is strong.

Write a function called is_strong_password(password) that returns True if the password meets all these requirements, and False otherwise. Use regular expressions to perform the necessary checks.

Uppgift

Swipe to start coding

You need to create a function that checks if a password is strong using regular expressions. A strong password must satisfy all of these requirements:

  • Be at least 8 characters in length;
  • Include at least one uppercase letter;
  • Include at least one lowercase letter;
  • Include at least one digit;
  • Include at least one special character (any character that is not a letter or digit).

Return True if the password meets all criteria, or False if it does not.

Lösning

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 3. Kapitel 5
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

close

Awesome!

Completion rate improved to 6.67

bookChallenge: Validate Strong Passwords

Svep för att visa menyn

To practice applying advanced regular expression techniques, you will create a password validator that checks if a password is strong.

Write a function called is_strong_password(password) that returns True if the password meets all these requirements, and False otherwise. Use regular expressions to perform the necessary checks.

Uppgift

Swipe to start coding

You need to create a function that checks if a password is strong using regular expressions. A strong password must satisfy all of these requirements:

  • Be at least 8 characters in length;
  • Include at least one uppercase letter;
  • Include at least one lowercase letter;
  • Include at least one digit;
  • Include at least one special character (any character that is not a letter or digit).

Return True if the password meets all criteria, or False if it does not.

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 3. Kapitel 5
single

single

some-alt