random number generation : Random : Development PYTHON examples


PYTHON examples » Development » Random »

 

random number generation


random number generation
 


import random

# generate random numbers 6
die1 = random.randrange(61    
die2 = random.randrange(61

total = die1 + die2

print "You rolled a", die1, "and a", die2, "for a total of", total



           
         
  



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Development
» Random


Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0