Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need python code for below problem in Strings ---------------------------------------- Every employee of the Gocargo carriers are asked to update their email ids for communication purposes.

Need python code for below problem in Strings

----------------------------------------

Every employee of the Gocargo carriers are asked to update their email ids for communication purposes. The employees tend to give in email ids that are not in the proper format. Can you please help the IT team in validating the email ids of the employees? There are set of rules for the email ids to get validated. The format of the email id is given below username@domain.TLD where, TLD - Top Level Domain Business rules: Rule1: Top level domain should be ".com" or ".in" or ".edu" Rule2: domain name should have more than 3 characters Rule3: username should be alphabets, numberical, special characters The special characters allowed are (. , _ , - ). Should contain only lower-case characters. Should not start or end with special character. Input Format : Input is a string, the email id of the employee. Output Format: Output is a string, that prints "Valid" if the email id is valid, else prints "Invalid" followed by the violated rule numbers separated by new-line. Sample Input 1: _akshay@rosho.org Sample Output 1: Invalid 1 3 Sample Input 2: aks_hay@rosho.com Sample Output 2: Valid

-------------------

Thanks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions