Random modules let you have random numbers/order when attached to a function.
Example:
import random
print random.randint(0, 5)
#This will output either 1, 2, 3, 4 or 5.
Example:
import random
random.random() * 100
#This will find a random between 0 and 100.
Example:
import random
myList = [2, 109, False, 10, "Lorem", 482, "Ipsum"]
random.choice(myList)
x = [[i] for i in range(10)]
shuffle(x)
import random
for i in range(3):
print random.randrange(0, 101, 5)
import random
import itertools
outcomes = { 'heads':0,
'tails':0,
}
sides = outcomes.keys()
for i in range(10000):
outcomes[ random.choice(sides) ] += 1
print 'Heads:', outcomes['heads']
print 'Tails:', outcomes['tails']
#There are only two outcomes allowed, so rather than use numbers and convert them, the words “heads” and “tails” are used with choice().
According to references, Risk analysis is the process in which it defines and calculate the risk percendtage and effect on the software. using risk analysis at the begining of any project insures the following:
** Certain risks that you must know about:**
In order to take care of that:
Risks identifications:
The following flowchart represents the Risk Assesment

Test coverage is a tool used to find which parts are not tested in the code.
TDD is a very useful, but certainly not sufficient, tool to help you get good tests. 1
If you have two different steps in your algorithm, you add up those steps: if you have a first step that takes O(a) time, and a seconod step takes O(b) time —> O(a+b)
Drop constants: if you have a result of O(2n) just drop the constant 2 —> O(n)
If you have different inputs you’re going to use different variables to represent them: if you have for example 2 arrays and you want to find the common elements. n shouldn’t be the array size,cause there’re two, so here define a as size array 1 and b as size array b —> O(a*b)
Drop non dominate terms: if the first step takes O(n), and the second takes O(n^2) –> O(n+n^2) BUT this actually means —> O(n^2)
https://martinfowler.com/bliki/TestCoverage.html ↩