Search for question
Question

Write a Python program that takes an email ID as input from the

user. Your program must first check if the user input is a valid email

ID. In addition, your program needs to do the following:

1. Print out the email ID as separate parts. For instance, if the

email id is some.body@zu.ac.ae, the program prints,

ID: some.body

Domain: zu.ac.ae

1. Print the number of occurrences of each character in the email

id and decide if it is a vowel, consonant, or special character.

For instance, a partial example is given below.

s:1 - consonant

0:2 - vowel

m:1- consonant

e:2 - vowel

.: 3- special character/n1. If there are numbers in the email id, print out if the number is

divisible by 2, 3, 5, or a combination. For instance, if the

number 15 is in the email id, it is divisible by 3 and 5.

2. Provide an encrypted version of the email ID. This is done by

converting all the letters to numbers. For this use, the ASCII

value of all the letters in the email id (you can convert letters to

ASCII values easily here), and if there are numbers in the

email id, add 2 to the numbers. Print out the original email ID

and the encrypted version. For instance:

Email: some.body@zu.ac.ae

Encrypted: 115, 111, 109, 101, 46, 98, 111, 100, 121, 64, 122, 117,

46, 97, 99, 46, 97, 101

1. Run the code at least twice, once for your ZU e-mail ID and

once for the email address of your team member, to check if

the code is working. Use the email version with the ID

numbers, i.e., X@zu.ac.ae, where X is your ZU ID.

Fig: 1

Fig: 2