Cody

Problem 35. Quote Doubler

Solution 2684120

Submitted on 12 Jul 2020
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   Fail
s1 = 'He said ''Look over there!'''; s2_correct = 'He said ''''Look over there!'''''; assert(isequal(quote_doubler(s1),s2_correct))

ans = 'H' ans = 'e' ans = ' ' ans = 's' ans = 'a' ans = 'i' ans = 'd' ans = ' ' ans = ''' ans = 'L' ans = 'o' ans = 'o' ans = 'k' ans = ' ' ans = 'o' ans = 'v' ans = 'e' ans = 'r' ans = ' ' ans = 't' ans = 'h' ans = 'e' ans = 'r' ans = 'e' ans = '!' ans = ''' s2 = 'He said 'Look over there!''

Assertion failed.

2   Fail
s1 = ''''; s2_correct = ''''''; assert(isequal(quote_doubler(s1),s2_correct))

ans = ''' s2 = '''

Assertion failed.

Suggested Problems

More from this Author95