reading-notes

code fellows reading notes

View on GitHub

Reading-Notes

Code Fellows Python 401

Read: 06 - Ten Thousand Game 1

How to use Random Module

Randint

Random

Choice

myList = [2, 109, False, 10, “Lorem”, 482, “Ipsum”] random.choice(myList)


### Shuffle
- shuffles the elements in a list in place
``` python
from random import shuffle
x = [[i] for i in range(10)]
shuffle(x)

output: print x gives [[9], [2], [7], [0], [4], [5], [3], [1], [8], [6]] results will vary

Randrange

Code Example

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']

What is Risk Analysis

In Software Testing, risk analysis is the process of identifying the risks in applications or software that you built and prioritizing them to test.

Why

Risk Identifications:

Risk Assessment

Risk Assessment Visual

perspective of Risk Assessment

How to perform Risk Analysis

  1. Searching the risk

  2. Analyzing the impact of each individual risk

  3. Measures for the risk identified

Test Coverage

also called code coverage

Video: Big O Notation

Bookmark and Review