Understanding global, local scope is important for accessing variables, functions etc within your code and limiting the amount of times you have to rewrite code.
Big O notation is important for resource management and efficiency of code.
start variable is local to the function it’s in.
The global keyword will ensure a variable is mapped to global/module scope that it’s defined in in case it might need to accessed within another function, while nonlocal limits the use of the variable to within a nested function in order to reuse variable names…
Big O notation conveys an algorithms complexicity/efficiency based on how it processes the code. It’s important for resource utilization and can be a good hint at if code needs to be refactored or made more efficient.
In python you can import the random library and use the randint(x,x) function to create a variable with a random number between the range you give it. Ex: dice_roll = tuple(random.randint(1,6)). In order to find the probability you can create a loop that will loop 20 times, and call a function that “rolls” the dice. On each roll, append the number to an empty list and count how many times you rolled your desired number