In this post, we will learn to build "Email Generator" using python.
✅ Problem Statement:
Mr. John works for a company. His job is to assign email-id to new employees. He wants to automate this process and we are going to help him in this task.
Lets build Email Generator !
✅ Concepts Covered in this Post:
- Use of input()
- Use of print()
- String Concatenation
📑 Let's Code :)
Step 1 : Create new file and start writing code to build email generator..
As mentioned above, we need to take 3 inputs from user :
- FirstName
- LastName
- Month of Birth
🔴 input () function first takes input from user and then evaluates the expression, which means Python automatically identifies whether user entered a string or a number or list.
Step 2 : After taking inputs , we need to use concept of String Concatenation to generate email-Id in given format.
String Concatenation is the technique of combining two strings.
We can concatenate two strings in python using "+" operator.
Lets complete code for Email Generator :
emailGenerator 1.1 |
print() function is used to print the specified message on screen.
Step 3 : Let's run the code and check output :)
Here I'm attaching screenshot of sample output 👇👇
Here we are done with our new project :)
Hope you like this post 😉
You can reach us by entering your details in Contact Us box in the side panel💬
All the Best 👍👍👍👍
Happy Learning 😇
Source Code by -
Pavani P.
(Guest Writer)
Wanted to be our Next Guest Writer ? You are just one DM away 😉 . Reach out to us on our insta handle or fill contact us form !