import random # Author: James Tam # Version: September 29, 2014 # Simulates a 100 sided die roll # (Application: simulations or games that require percentages/ # probabilities # E.g.1, Role playing games were skills increase as # levels increase, the higher the skill level the greater the # chance of success (level 1 has 10% chance to suceeed, level 2 has 15% # chance to suceed at particular task). # # E.g. 2, Seriously simulations, there's a 10% chance of the federal bank # raising interest rates by 0.25% next year, a 15% chance of a 0.50% rate # hike and 60% chance of no change to borrowing costs. result = random.randrange(1,101) print(result)