Skip to content

Commit 6f93310

Browse files
committed
isograms
1 parent ef7360d commit 6f93310

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Isograms/isograms.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
def is_isogram(string):
2+
lower_string = string.lower()
3+
unique_string = set(lower_string)
4+
return (len(lower_string)==len(unique_string))
5+
6+
def main():
7+
print(is_isogram("Dermatoglyphics"))
8+
print(is_isogram("aba"))
9+
print(is_isogram("moOse"))
10+
print(is_isogram(""))
11+
12+
main()

Isograms/problem_statement.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
An isogram is a word that has no repeating letters, consecutive or non-consecutive.
2+
How to determine whether a string is an isogram. Ignore letter case
3+
4+
Ex.
5+
"Dermatoglyphics" is isogram.
6+
"aba" is not isogram.
7+
"moOse" is not isogram.

0 commit comments

Comments
 (0)