6 kyu

Spin the sentence

223rayn

Description:

In this kata you will have to modify a sentence so it meets the following rules:

convert every word backwards that is:

longer than 6 characters

OR

has 2 or more 'T' or 't' in it

convert every word uppercase that is:

exactly 2 characters long

OR

before a comma

convert every word to a "0" that is:

exactly one character long

NOTES:

  Punctuation must not be touched. if a word is 6 characters long, and a "." is behind it,
  it counts as 6 characters so it must not be flipped, but if a word is 7 characters long,
  it must be flipped but the "." must stay at the end of the word.
  -----------------------------------------------------------------------------------------
  Only the first transformation applies to a given word, for example 'companions,'
  will be 'snoinapmoc,' and not 'SNOINAPMOC,'.
  -----------------------------------------------------------------------------------------
  As for special characters like apostrophes or dashes, they count as normal characters, 
  so e.g 'sand-colored' must be transformed to 'deroloc-dnas'.
Strings
Fundamentals

Stats:

CreatedDec 14, 2017
PublishedDec 14, 2017
Warriors Trained623
Total Skips20
Total Code Submissions997
Total Times Completed223
Python Completions223
Total Stars15
% of votes with a positive feedback rating87% of 63
Total "Very Satisfied" Votes50
Total "Somewhat Satisfied" Votes10
Total "Not Satisfied" Votes3
Total Rank Assessments6
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • rayn Avatar
  • Blind4Basics Avatar
  • saudiGuy Avatar
Ad