Question about random.randit()

I was in modules lesson and i have learnt the “random” module but somethings didn’t fit my head completely.
Ekran görüntüsü 2020-10-22 133942
Here in this code i just tried to use random.randint() method by setting it to a variable but it gives me attribute error.
Why can’t i use it with a variable ? or did i use it wrong ?

the attribute error is related to .randint() attribute/method itself. You have a typo in the method/attribute name


Sorry… I was trying to figure out the problem for a long time… My bad.

No need to apologize :wink: randint is an abbreviation of random integer :wink:

Understanding the error (the attribute/method didn’t exists) can also help you debug this kind of error easier in the future.

1 Like