random - Python how to check if something is in a list -
i making multiple choice game in python have variable selects random number.
when next box clicked, want random number change every time button clicked. also, want append random list , check if random in list. if so, random changes again different number, questions don't repeat.
i want change random random number again, integer has no attribute randint. how check see if random number in list?
i have if
statement tell me if clicked already, need figure out how change random again after startup.
your problem, clear error message should have included in question, like:
import random # 'random' refers module ... random = random.randint(...) # 'random' refers integer
now can't access of functionality of random
module. why on earth that?! give variable different name module.
random_choice = random.randint(...)
Comments
Post a Comment