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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -