+ 2

Would you describe line 4 of this code ?

Would you describe the logic of line 4 of this code ? https://code.sololearn.com/cy4utKJtuAEu/?ref=app

25th Jan 2018, 3:52 PM
NIMA
NIMA - avatar
2 Respuestas
+ 3
value = random.randint(1, 6) value is a new variable which is set to a random number between 1 and 6. randint means that it is a random integer.
25th Jan 2018, 3:59 PM
Jacob Pembleton
Jacob Pembleton - avatar
+ 3
Whenever the for loop is run, the variable value is set a random integer value that ranges from 1 to 6 (which also includes 1 and 6). Hope this helped!
25th Jan 2018, 3:59 PM
Faisal
Faisal - avatar