Cody

Solution 2106029

Submitted on 26 Jan 2020 by lior dmitrichenko
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
sentence = 'this is BETTER than C++'; corrected = 'This Is Better Than C++'; assert(isequal(autoCase(sentence), corrected))

a = 'this is BETTER than C++' a = 'this is better than c++' s = 5 8 15 20 a = 'this Is Better Than C++' a = 'This Is Better Than C++' corrected = 'This Is Better Than C++'

2   Pass
sentence = 'hEy, tHis iS vErY wroNg!'; corrected = 'Hey, This Is Very Wrong!'; assert(isequal(autoCase(sentence), corrected))

a = 'hEy, tHis iS vErY wroNg!' a = 'hey, this is very wrong!' s = 5 10 13 18 a = 'hey, This Is Very Wrong!' a = 'Hey, This Is Very Wrong!' corrected = 'Hey, This Is Very Wrong!'

3   Pass
sentence = 'tHIS sENTENCE wILL bE iNVERTED'; corrected = 'This Sentence Will Be Inverted'; assert(isequal(autoCase(sentence), corrected))

a = 'tHIS sENTENCE wILL bE iNVERTED' a = 'this sentence will be inverted' s = 5 14 19 22 a = 'this Sentence Will Be Inverted' a = 'This Sentence Will Be Inverted' corrected = 'This Sentence Will Be Inverted'

4   Pass
sentence = 'This Sentence Will Not Be Changed'; corrected = 'This Sentence Will Not Be Changed'; assert(isequal(autoCase(sentence), corrected))

a = 'This Sentence Will Not Be Changed' a = 'this sentence will not be changed' s = 5 14 19 23 26 a = 'this Sentence Will Not Be Changed' a = 'This Sentence Will Not Be Changed' corrected = 'This Sentence Will Not Be Changed'

5   Pass
sentence = 'HELLO THERE'; corrected = 'Hello There'; assert(isequal(autoCase(sentence), corrected))

a = 'HELLO THERE' a = 'hello there' s = 6 a = 'hello There' a = 'Hello There' corrected = 'Hello There'

6   Pass
sentence = 'AlTeRnAtInG cApS'; corrected = 'Alternating Caps'; assert(isequal(autoCase(sentence), corrected))

a = 'AlTeRnAtInG cApS' a = 'alternating caps' s = 12 a = 'alternating Caps' a = 'Alternating Caps' corrected = 'Alternating Caps'