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?
5,497 of 12,641myjinxin2015
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
Similar Kata:
Stats:
Created | May 29, 2016 |
Published | May 29, 2016 |
Warriors Trained | 22419 |
Total Skips | 474 |
Total Code Submissions | 54218 |
Total Times Completed | 12641 |
JavaScript Completions | 4463 |
CoffeeScript Completions | 24 |
Ruby Completions | 597 |
Python Completions | 5497 |
Haskell Completions | 256 |
C# Completions | 812 |
C Completions | 410 |
PureScript Completions | 7 |
C++ Completions | 906 |
Scala Completions | 24 |
Total Stars | 229 |
% of votes with a positive feedback rating | 89% of 1681 |
Total "Very Satisfied" Votes | 1359 |
Total "Somewhat Satisfied" Votes | 265 |
Total "Not Satisfied" Votes | 57 |