vendredi 3 mai 2019

I want to use out of several variables that have random generated values each time a random choice as output

so I figured already how to create variables with random values. x = random.randint(0, 10) for example.

However, I have 3+ other randomly generated variables y, z & w and I would like to make them be chosen randomly and then be subtracted from another variable which has a constant value, but the outcome should be saved and printed.

Tried to put x,y,z,w in a new variable and make that with random.choice, did not work.

Actually, this is my first "proper" project, out of personal interest and I try to create a game, I suppose. After each usercast, the enemy should do an action too, but the enemy has randomly generated attack values and the spells are also randomly chosen.

But yea, still quite struggling here.

I hope this is clear, if clarification is required let me know (:




Aucun commentaire:

Enregistrer un commentaire