0
Hello how we can know the string is isogram detector
6 Answers
+ 1
ŠŠ²Š³ŠµŠ½ŠøŠ¹ It checks if a word does not contain a duplicated character..
For example, "heloo" has repeated letter "o" which makes it not an isogram
Anyways, Ahlam Abdurehman please show us your attempt here
+ 6
Dragon RB ,
an isogram is a string in which *each* letter occurs only once. it is not just about vowels.
+ 4
Ahlam Abdurehman ,
to get this task done, we can go for one of these approaches:
(1) using a set:
we can take the string that should be checked and find its number of characters with len() function.
we take the same string and convert it to a set. this will remove all duplicated letters. then check the set for its number of characters.
if both strings have the same length, it is an isogram.
(2) using a loop
we run a loop over the string to check.
for each character we get in the loop, we can check if it occurs multiple times by using the string method count().
if count returns a number greater than 1, it is no isogram.
+ 2
Thank you
+ 1
What is isogram?
+ 1
Lothar Ah yes, my bad.