Cody

# Problem 44231. Is it a mail?

Solution 1251867

Submitted on 15 Aug 2017 by Chris Cleveland
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
x ='ilove@cody.math'; correct_answer = true; assert(isequal(ismail(x),correct_answer))

ans = logical 1

2   Pass
x ='goc3@kjkjhedfqoishdoifqjsdjvkshiufghiorhoihfoiqphsoihqohfoiqhpsoiffvhnqokshfvoiqhdshfoviqhskfhvoqisdhfvqshoifvhqosidfvioqsfdivhqsoifdvghjqsiofvqoisjoivqhsoifhvqshfvhqsfhvqklsffnvkqsjdfnvqksjfnvqklfdshvqkslvjklqskvlqjslvkqsnvqklsdfvklqsdfvjnqkldfsvkqklvjqfvklqdjf.dz'; correct_answer = false; assert(isequal(ismail(x),correct_answer))

ans = logical 0

3   Pass
x ='goc3@kjkjhedfqoishdoifqjsdjvkshiufghiorhoihfoiqphsoihqohfoiqhpsoiffvhnqokshfvoiqhdshfoviqhskfhvoqisdhfvqshoifvhqosidfvioqsfdivhqsoifdvghjqsiofvqoisjoivqhsoifhvqshfvhqsfhvqklsffnvkqsjdfnvqksjfnvqklfdshvqksl@vjklqskvlqjslvkqsnvqklsdfvklqsdfvjnqkld.dz'; correct_answer = false; assert(isequal(ismail(x),correct_answer))

ans = logical 0

4   Pass
x ='goc3@kjkjhedfqoishdoifqjsdjvkshiufghiorhoihfoiqphsoihqohfoiqhpsoiffvhnqokshfvoiqhdshfoviqhskfhvoqisdhfvqshoifvhqosidfvioqsfdivhqsoifdvg hjqsiofvqoisjoivqhsoifhvqshfvhqsfhvqklsffnvkqsjdfnvqksjfnvqklfdshvqkslvjklqskvlqjslvkqsnvqklsdfvklqsdfvjnqkld.dz'; correct_answer = true; assert(isequal(ismail(x),correct_answer))

5   Pass
x =1223; correct_answer = false; assert(isequal(ismail(x),correct_answer))

6   Pass
x ='123@mathworks.com'; correct_answer = false; assert(isequal(ismail(x),correct_answer))

ans = logical 0

7   Pass
x ='james@mathworks@com'; correct_answer = false; assert(isequal(ismail(x),correct_answer))

ans = logical 0

8   Pass
x ='james@mathworks@com'; correct_answer = false; assert(isequal(ismail(x),correct_answer))

ans = logical 0

9   Pass
x ='msila@tarmount.com'; correct_answer = true; assert(isequal(ismail(x),correct_answer))

ans = logical 1

10   Pass
x ='ssssss@m@thworks.xyz'; correct_answer = false; assert(isequal(ismail(x),correct_answer))

ans = logical 0

11   Pass
x ='mes@rym.co.uk'; correct_answer = true; assert(isequal(ismail(x),correct_answer))

ans = logical 1

12   Pass
x ='abc?!@bro.tr..dz'; correct_answer = false; assert(isequal(ismail(x),correct_answer))

ans = logical 0

13   Pass
x ='abcd@?ml?club'; correct_answer = false; assert(isequal(ismail(x),correct_answer))

ans = logical 0

14   Pass
x ='abcd@3.141592653589793238462643383279502884197169399375105820974944592.com'; correct_answer = true; assert(isequal(ismail(x),correct_answer))

ans = logical 1

15   Pass
x ='info@thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com'; correct_answer = true; assert(isequal(ismail(x),correct_answer))

ans = logical 1

16   Pass
x ='info@thelongestdomainnameintheworld andthensomeandthensomemoreandmore.com'; correct_answer = false; assert(isequal(ismail(x),correct_answer))

ans = logical 0

17   Pass
x ='inf o@thelongestdomainnameintheworld andthensomeandthensomemoreandmore.com'; correct_answer = false; assert(isequal(ismail(x),correct_answer))

ans = logical 0