AttributeError: module 'random' has no attribute 'randint' I ran this code here on TeamTreeHouse work-space few days ago and it was fine. Now I am getting this error:- "AttributeError: module 'random' has no attribute 'randint'
2 First group is real error Second group relates to help(random) Sorry about confusion. File "C:/Users/blueg/Google Drive/Programming/Python/PycharmProjects/ ...
It only gets highlighted when I type randint. When I run it, it shows me the following error: AttributeError: module 'random' has no attribute 'randint' I am not able to know what's wrong with it, because the same code works properly on workspaces where I am able to import random and use randint very properly. Please help me know how I can fix it.
AttributeError: 'module' object has no attribute 'randint' [duplicate] Ask Question Asked 5 years, 4 months ago. Active 5 years, 4 months ago. Viewed 2k …
28.02.2016 · Show activity on this post. I want to import the random module to use randint and get a random number from 1 to 10. I have this so far: import random number = random.randint (1,10) print number. I've also tried importing randint specifically, but that doesn't work either. With the code above, I get object has no attribute 'randint.'.
24.07.2017 · AttributeError: module 'random' has no attribute 'randint' Follow. Answered. Skanchan221 Created July 24, 2017 20:23. I am getting an error, while writing a simple random number generating code. How can this be resolved. I just recently took up ...