+ 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.
23 Respuestas
+ 2
you can post here
+ 1
no no... write a program for an email address having 6 alphabets, 4 number, one or zero underscore and then @hackerrank.com
+ 1
okay. no problem.
+ 1
random
0
you can use java script.
i just want see the working of the program.
0
use python and write it on your computer.
you can mail me your source code on saurabh.iiitu@gmail.com
0
it's okay... just write a simple program.
0
got it now?
0
waiting for Google source code
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
- 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?
- 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.
- 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.
- 1
So the email will be saurab1234-@hackerrank.com?
- 1
Yes.
- 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
- 1
Does it matter what the numbers and letters are? Or can they just be random?
- 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’)
- 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.
- 1
Please let me know what you think and if you had any issues.