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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
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.

 

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY