Posted By

onekind on 03/23/11


Tagged

random


Versions (?)

Random nine digit number generator


 / Published in: Python
 

This program generates random nine digit number and prints it to the terminal screen.

  1. #importing random function
  2. import random
  3.  
  4. strRandomNumber = ""
  5.  
  6. for i in range(1,10):
  7. intNumber = random.randrange(10)
  8. strRandomNumber += str(intNumber)
  9.  
  10. print (strRandomNumber)

Report this snippet  

You need to login to post a comment.