- Joined
- Aug 2, 2014
Is there a way to reset python. Or . Perhaps. __Re-install it?
I say this because my python is acting strange . There are certain basic commands that it is reporting as error.
Just trying to play around with randint and some variables,
and it doesn't recognize randint
Traceback (most recent call last):
file "dice.py", line 1, in <module>
import random
file "/home/wrabbit/random.py", line 4, in <module>
password = "".join(choice(characters) for x in range(randint(8,16)))
NameError: name 'randint' is not defined
___________________________________
so on and so on. It's all bugged out.
can I just reset it or re-install it or debug it?
Is there a way?
------------------------------------------
I say this because my python is acting strange . There are certain basic commands that it is reporting as error.
Just trying to play around with randint and some variables,
and it doesn't recognize randint
Traceback (most recent call last):
file "dice.py", line 1, in <module>
import random
file "/home/wrabbit/random.py", line 4, in <module>
password = "".join(choice(characters) for x in range(randint(8,16)))
NameError: name 'randint' is not defined
___________________________________
so on and so on. It's all bugged out.
can I just reset it or re-install it or debug it?
Is there a way?
------------------------------------------
Code:
import random
for x in range (1,11):
throw_1 = random.randint(1,6)
throw_2 = random.randint(1,6)
total = throw_1 + throw_2
print (total)
if total == 7:
print ('Seven Thrown!')
if total == 11:
print ('Eleven Thrown!')
if throw_1 == throw_2:
print ('Double Thrown!')