We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf145f7 commit 6327ad2Copy full SHA for 6327ad2
exercises/isogram/example.py
@@ -0,0 +1,4 @@
1
+def isogram(string):
2
+ string = string.lower()
3
+ return len(set(string)) == len(string)
4
+
exercises/isogram/isogram_test.py
@@ -0,0 +1,20 @@
+import unittest
+from example import isogram
5
+class TestIsogram(unittest.TestCase):
6
7
+ def test_isogram(self):
8
+ tests = ['lumberjacks', 'background', 'downstream']
9
+ for test in tests:
10
+ string = isogram(test)
11
+ self.assertTrue(string, True)
12
13
+ def test_isogram_false(self):
14
+ tests = ['isograms', 'aba', ' ']
15
16
17
+ self.assertFalse(string, False)
18
19
+if __name__ == '__main__':
20
+ unittest.main()
0 commit comments