+ 2

Check a given email address is correct or not.

It should start with six alphabets. then it followed by four numbers. after then, there may be or may not be an underscore and then @hackerrank.com should be there. example: if input is saurab1234_@hackerrank.com then output should be correct.

7th Feb 2018, 8:59 PM
Saurabh Yadav
Saurabh Yadav - avatar
23 Respostas
+ 2
you can post here
7th Feb 2018, 9:49 PM
Saurabh Yadav
Saurabh Yadav - avatar
+ 1
no no... write a program for an email address having 6 alphabets, 4 number, one or zero underscore and then @hackerrank.com
7th Feb 2018, 9:23 PM
Saurabh Yadav
Saurabh Yadav - avatar
+ 1
okay. no problem.
7th Feb 2018, 9:28 PM
Saurabh Yadav
Saurabh Yadav - avatar
+ 1
random
7th Feb 2018, 9:29 PM
Saurabh Yadav
Saurabh Yadav - avatar
0
you can use java script. i just want see the working of the program.
7th Feb 2018, 9:05 PM
Saurabh Yadav
Saurabh Yadav - avatar
0
use python and write it on your computer. you can mail me your source code on saurabh.iiitu@gmail.com
7th Feb 2018, 9:10 PM
Saurabh Yadav
Saurabh Yadav - avatar
0
it's okay... just write a simple program.
7th Feb 2018, 9:19 PM
Saurabh Yadav
Saurabh Yadav - avatar
0
got it now?
7th Feb 2018, 9:23 PM
Saurabh Yadav
Saurabh Yadav - avatar
0
waiting for Google source code
7th Feb 2018, 9:26 PM
Saurabh Yadav
Saurabh Yadav - avatar
0
regular expression was invented for these tasks e.g. for your email it would be [a-zA-Z]{6,6}[0-9]{4,4}[_]@hackerrank.com
7th Feb 2018, 11:08 PM
---
--- - avatar
- 1
What programming language do you want to use? You tagged a lot of them so do you mean you don’t care? And will this be connected to your email? Or will it be used for login like an app?
7th Feb 2018, 9:01 PM
Jax
Jax - avatar
- 1
Is python alright though? I’m a bit of a novice in JavaScript. And I don’t know where in this app I’m supposed to write code either. I use my computer mostly. So I need to know where I write it first.
7th Feb 2018, 9:07 PM
Jax
Jax - avatar
- 1
Will this email address be the only one? Or you be able to create a new one? Like if you don’t have an email another question will pop up saying please enter email address? I’m not sure if I can do that very well.
7th Feb 2018, 9:18 PM
Jax
Jax - avatar
- 1
So the email will be saurab1234-@hackerrank.com?
7th Feb 2018, 9:21 PM
Jax
Jax - avatar
- 1
Yes.
7th Feb 2018, 9:23 PM
Jax
Jax - avatar
- 1
It’ll be a little bit. I have to finish it up. And I might have to post it here because my email is not working right. LOL even though I am in a coding app right now
7th Feb 2018, 9:28 PM
Jax
Jax - avatar
- 1
Does it matter what the numbers and letters are? Or can they just be random?
7th Feb 2018, 9:29 PM
Jax
Jax - avatar
- 1
Try this, email = input(‘Would you please- -enter your email address: ‘) if email == - -‘monkey1954@hackerrank.com’: print(‘Welcome back!’) else: print(‘Sorry but that is incorrect’)
7th Feb 2018, 9:37 PM
Jax
Jax - avatar
- 1
The dashes can be deleted, I just ran out of room and couldn’t fit them on the line. The spaces between each line can be deleted as well as I just put them there so you could tell the difference between the lines.
7th Feb 2018, 9:38 PM
Jax
Jax - avatar
- 1
Please let me know what you think and if you had any issues.
7th Feb 2018, 9:42 PM
Jax
Jax - avatar