Question: Q 1 : Email Builder - 3 0 pts The file associated with this question is EmailBuilder.py . Write a function build _ email (

Q1: Email Builder -30 pts
The file associated with this question is
EmailBuilder.py.
Write a function build_email(firstname, lastname, entry_year) such that:
firstname is the first name of the student (string)
lastname is the last name of the student (string)
entry_year is the year the student entered Ko University (string)
The function returns the e-mail address of the student, which is built by concatenating:
First letter of the student's first name
Student's last name in full
Last two digits of student's year of entry
@KU.EDU.TR"
The returned e-mail address should be completely in uppercase.
You must check for the following erroneous inputs:
First and last names should only contain letters from the English alphabet. No numbers,
no punctuation, no empty spaces. First and last names cannot be empty.
o If this rule is violated, build_email should return "-1".(string)
Year of entry should be a valid year: no letters, no punctuations. Also, year of entry must
be 2001 or later.
o If this rule is violated, build_email should return "-2".(string)
If both rules are simultaneously violated, build_email should return "-1".(string)
Examples:
, firstname = "John", lastname = "Doe", entry_year ="2020"
return value JDOE20@KU.EDU.TR"
firstname = "Jane", lastname = "Smith", entry_year ="2005"
return value "
JSMITH05@KU.EDU.TR"
firstname = "John-Marcus", lastname = "Doeington", entry_year ="2010"
return value "-1"
, firstname = "James", lastname = "Cool", entry_year ="1998"
return value "-2"
Q 1 : Email Builder - 3 0 pts The file associated

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!