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

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter4: The Selection Structure
Section: Chapter Questions
Problem 1MQ4
icon
Related questions
Question

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

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT