You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2022. It is now read-only.
I am trying to understand the simulator code for a project. I am unable to figure out the logic for the get_random_slice_index() method in main.py. It contains the following piece of code:
def get_random_slice_index(vals):
i = 0
r = random.random()
while vals[i] < r:
i += 1
return i
I am unable to figure out the logic for the while loop condition. Kindly assist me in the same.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to understand the simulator code for a project. I am unable to figure out the logic for the
get_random_slice_index()
method in main.py. It contains the following piece of code:I am unable to figure out the logic for the while loop condition. Kindly assist me in the same.
The text was updated successfully, but these errors were encountered: