take first name and last name, create email address in the format firstname.lastname@fhws.de in python

You can create an email address in the format firstname.lastname@fhws.de by following the below code in python.

main.py
first_name = input("Enter your First Name: ")
last_name = input("Enter your Last Name: ")
email = first_name.lower() + '.' + last_name.lower() + "@fhws.de"
print("Your email address is:", email)
195 chars
5 lines

Here, we are taking first name and last name as user input using the input function in python. After that, we are converting the first name and last name to lower case using the lower function to avoid any case sensitivity issues. Finally, we are concatenating the first and last name with a dot (.) and adding the domain name @fhws.de to form a valid email address.

gistlibby LogSnag