SHARE
TWEET

Untitled

a guest Jun 15th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import numpy
  2. from random import sample
  3. f = open("Python_Project.txt","w+")
  4. count = 0
  5. print("Enter 20 unique numbers within the range 1-100")
  6. while (count<20):
  7.     x = int(input())
  8.     if x > 0 and x < 101:
  9.         f.write(str(x))
  10.         f.write(" ")
  11.         count += 1
  12.     else:
  13.         print("Please Enter a number between the range")
  14. f.close()
  15. myfile = open("Python_Project.txt", "r")
  16. contents = myfile.read().split(',')
  17. myfile.close()
  18. print(contents)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top