#Exercism help on easy level - isogram, Python

10 messages · Page 1 of 1 (latest)

coarse thunder
#

Hi can anyone help with the is_isogram function? I am trying to understand how the functions work.

hazy reef
#

Hi!
The function should take a string and determine whether that string is an isogram or not.
Can you tell me where exactly you struggle?

coarse thunder
#

So when you say a string, does that mean I should enter an argument such as I have done as isogram? Is that correct?

#

I am struggling to understand the concept

#

I read through it and understood it, but when it comes to applying it I get confused

hazy reef
#

It looks like you're still learning Python, is that correct?
In that case I recommend starting with the syllabus and its concept exercises:
https://exercism.org/tracks/python/concepts
They try to teach one concept at a time.

#

This isogram exercise requires you to understand functions and strings (and maybe even other data structures for an efficient solution.)

coarse thunder
#

I have learned the different types of data structures, I just need practice. I get confused how to put the code together

hazy reef
#

But back to your question:
The tests call is_isogram("some_string") and require the result to be True or False, depending on whether that "some_string" is an isogram.
So you have to define the function is_isogram that takes a string as its argument.
The first line in your solution does that: def is_isogram(isogram): is the beginning of a function called is_isogram that takes a single argument. Within the function you can access that argument through the parameter isogram.
Now you have to inspect that parameter and decide whether it's an isogram.

coarse thunder
#

I will work in this, but first I think I need to keep reading over the examples.