8 kyu

They say that only the name is long enough to attract attention. They also said that only a simple Kata will have someone to solve it. This is a sadly story #1: Are they opposite?

3,993 of 11,171myjinxin2015

Description:

Task

Give you two strings: s1 and s2. If they are opposite, return true; otherwise, return false. Note: The result should be a boolean value, instead of a string.

The opposite means: All letters of the two strings are the same, but the case is opposite. you can assume that the string only contains letters or it's a empty string. Also take note of the edge case - if both strings are empty then you should return false/False.

Examples (input -> output)

"ab","AB"     -> true
"aB","Ab"     -> true
"aBcd","AbCD" -> true
"AB","Ab"     -> false
"",""         -> false
Puzzles
Games

Stats:

CreatedMay 29, 2016
PublishedMay 29, 2016
Warriors Trained19441
Total Skips384
Total Code Submissions49457
Total Times Completed11171
JavaScript Completions3993
CoffeeScript Completions22
Ruby Completions577
Python Completions4820
Haskell Completions244
C# Completions722
C Completions352
PureScript Completions7
C++ Completions722
Scala Completions18
Total Stars207
% of votes with a positive feedback rating89% of 1599
Total "Very Satisfied" Votes1294
Total "Somewhat Satisfied" Votes253
Total "Not Satisfied" Votes52
Ad
Contributors
  • myjinxin2015 Avatar
  • Javatlacati Avatar
  • suic Avatar
  • depperm Avatar
  • smile67 Avatar
  • donaldsebleung Avatar
  • user8580805 Avatar
  • kazk Avatar
  • Voile Avatar
  • Souzooka Avatar
  • rowcased Avatar
  • hobovsky Avatar
  • MikChan Avatar
  • rge123 Avatar
  • akar-0 Avatar
  • KayleighWasTaken Avatar
Ad