Challenge: Check Password Strength
In the challenges, we will utilize the Python language. Fulfilling the tasks won't demand an in-depth understanding of this language. However, if you want to feel more confident, you can consider Introduction to Python course.
Go here if needed.
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!
Task
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 provides powerful tools for pattern matching and text manipulation. If you want to have more practice with these expressions, you can try our Regex Wizards project.
Once you've completed this task, click the button below the code to check your solution.
Everything was clear?
Course Content
Cyber Security Fundamentals
1. Introduction to Cyber Security
Cyber Security Fundamentals
Challenge: Check Password Strength
In the challenges, we will utilize the Python language. Fulfilling the tasks won't demand an in-depth understanding of this language. However, if you want to feel more confident, you can consider Introduction to Python course.
Go here if needed.
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!
Task
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 provides powerful tools for pattern matching and text manipulation. If you want to have more practice with these expressions, you can try our Regex Wizards project.
Once you've completed this task, click the button below the code to check your solution.
Everything was clear?