504 Topics

Member Avatar for lewashby

In the following code, in the method [CODE]talk(self)[/CODE], [CODE]self.name[/CODE]. What self is self.name referring to? I though variables created in functions and methods are only good within that method or function. But here it looks like it's talking to [CODE]__init__[/CODE] & [CODE]__str__[/CODE]. Can someone please explain? It's starting to get …

Member Avatar for Gribouillis
0
94
Member Avatar for lewashby

In the code below, the only part I'M having trouble with is word[position]. I know this is something really simple but I've always had trouble understanding these kinds of statements. I know that it print a random letter (position) from (word). What I don't know is why or how it …

Member Avatar for jice
0
122
Member Avatar for lewashby

In the code below, the only part I'M having trouble with is word[position]. I know this is something really simple but I've always had trouble understanding these kinds of statements. I know that it prints a random letter (position) from (word). What I don't know is why or how it …

Member Avatar for vegaseat
-1
119
Member Avatar for lewashby

In the program be below, I'M having trouble with these few lines, remember, I'M new. What's going on here? I'M just a little confused because there is (word) wraped in len(). [CODE]position = random.randrange(len(word))[/CODE] And what's going on with these two lines? Thanks. [CODE] jumble += word[position] word = word[:position] …

Member Avatar for snippsat
-1
169

The End.