Compare commits
No commits in common. "abgabe_uebung1" and "master" have entirely different histories.
abgabe_ueb
...
master
@ -1,10 +0,0 @@
|
||||
# https://www.codewars.com/kata/5dd462a573ee6d0014ce715b
|
||||
|
||||
def same_case(a, b):
|
||||
if not a.isalpha() or not b.isalpha():
|
||||
return -1
|
||||
|
||||
if (a.islower() and b.islower()) or (a.isupper() and b.isupper()):
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@ -1,8 +0,0 @@
|
||||
from src.same_case import same_case
|
||||
|
||||
def test_same_case():
|
||||
assert same_case('a', 'g') == 1
|
||||
assert same_case('A', 'C') == 1
|
||||
assert same_case('b', 'G') == 0
|
||||
assert same_case('B', 'g') == 0
|
||||
assert same_case('0', '?') == -1
|
||||
Loading…
x
Reference in New Issue
Block a user