fb pixel

Educational emails

The university staff wants to identify who is registering on their website. It’s likely that there might be some people that are not even students. To check that, they ask you to check if their emails are valid and if they contain an .edu extension.
The email is valid if it:
  • Contains a @ symbol
  • Has an .edu extension
  • Has a length greater than 4 and less than 30
The input contains a single line - the email. The output should have Valid if it’s a valid registered student, and Invalid otherwise.
Input
Output
anna@mit.edu.com
Valid
bob.is.here@gmail.com
Invalid
 
To check your solution you need to sign in
Sign in to continue