Challenge: Check Password Strength
Now, let's create a simple program to assess the strength of a password. As we've emphasized earlier, having a robust password is crucial for protection against malware and phishing attempts. So, let's proceed with building our straightforward program!
Swipe to start coding
You have to write a function that checks the strength of the password. Password is considered strong if it has more than 8 characters and there is at least one number and at least one letter.
- Use
<
operator to check if the provided password has more than 8 characters. - Use
.search()
method ofre
library to check if there is at least one number and at least one number.
Note
re
is the abbreviation for the "regular expression" module in Python. It offers powerful tools for pattern matching and text manipulation, making it useful for tasks like searching, replacing, and validating strings.
Once you've completed this task, click the button below the code to check your solution.
Løsning
Takk for tilbakemeldingene dine!
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 5
Challenge: Check Password Strength
Sveip for å vise menyen
Now, let's create a simple program to assess the strength of a password. As we've emphasized earlier, having a robust password is crucial for protection against malware and phishing attempts. So, let's proceed with building our straightforward program!
Swipe to start coding
You have to write a function that checks the strength of the password. Password is considered strong if it has more than 8 characters and there is at least one number and at least one letter.
- Use
<
operator to check if the provided password has more than 8 characters. - Use
.search()
method ofre
library to check if there is at least one number and at least one number.
Note
re
is the abbreviation for the "regular expression" module in Python. It offers powerful tools for pattern matching and text manipulation, making it useful for tasks like searching, replacing, and validating strings.
Once you've completed this task, click the button below the code to check your solution.
Løsning
Takk for tilbakemeldingene dine!
Awesome!
Completion rate improved to 5single