Advertisement
tyler569

Random fun

May 5th, 2012
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. import random
  2.  
  3. x=input('Input a number ')
  4. x=int(x)+1
  5.  
  6. for loop in range(x):
  7.     while 1:
  8.         test=random.randrange(x)
  9.         print(test," ", end='')
  10.         if loop==test:
  11.             print()
  12.             break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement