+ 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
2 Answers
+ 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.
+ 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!