The university, ask the student to enter his/ her e-mail address then check if it valid or not the address must meet the following requirements: end by @ksu.edu.sa, it must contain exactly 9 digits. If the address is valid ask them to type a valid password for the campus computer system, the password must meet the following requirements: The password must be at least seven characters long. It must contain at least one uppercase letter. It must contain at least one lowercase letter. It must contain at least one numeric digit. When a student sets up his or her password, the password must be validated to ensure it meets these requirements. You have been asked to write the code that performs this validation for email and password. You decide to write a function named “valid_ address” and “valid_password” that accepts the e-mail address and password as an argument respectively and returns either true or false, to indicate whether they are valid or not. If all are valid save it in a file named “accounts.txt” open the file with ‘a’ mode to append the new account without deleting the already existed in the file, each student in separate line, and separate student’s information by white space. ON PYTHON
The university, ask the student to enter his/ her e-mail address then check if it valid or not
the address must meet the following requirements:
- end by @ksu.edu.sa,
- it must contain exactly 9 digits.
If the address is valid ask them to type a valid password for the campus computer system, the password must meet the following requirements:
- The password must be at least seven characters long.
- It must contain at least one uppercase letter.
- It must contain at least one lowercase letter.
- It must contain at least one numeric digit.
When a student sets up his or her password, the password must be validated to ensure it meets these requirements.
You have been asked to write the code that performs this validation for email and password. You decide to write a function named “valid_ address” and “valid_password” that accepts the e-mail address and password as an argument respectively and returns either true or false, to indicate whether they are valid or not.
If all are valid save it in a file named “accounts.txt” open the file with ‘a’ mode to append the new account without deleting the already existed in the file, each student in separate line, and separate student’s information by white space.
ON PYTHON
Trending now
This is a popular solution!
Step by step
Solved in 2 steps