+ 3

Question on the module random for Python 3.6.2

So, when I import random, it works. I have several list variables and a variable that chooses from those lists to create a unique combined output using random choice. my problem is the random only works when the program is restarted. when I open the program and the first set is made, it doesn't change the rest of the program. is there a way to make random work during the running process or am I at a loss? https://code.sololearn.com/cI73D5Nw867N/?ref=app

22nd Sep 2017, 11:03 PM
Kai
3 ответов
+ 4
You're incomprehensible. I am lost in uour explanation
24th Sep 2017, 5:26 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 1
I've uploaded the exact code from my computer. you'll need multiple inputs to call the function several times. however many times you give an input is how many times it will call the functions.
24th Sep 2017, 9:06 PM
Kai
0
Wow, this is an old question. While the code is gone now, i can provide an answer as to what happened here though I had a couple lists with names in them inside a function. Because of the way it was written, the randomization only happened once the entire program. Making the result of my "full name" variable the same everytime the function was called after it was chosen the the very first time. Remember that randomizing must called everytime the function is called instead of being assigned
9th Feb 2019, 2:09 PM
Kai