G2A Many GEOs
SHARE
TWEET

Untitled

a guest Apr 5th, 2020 132 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from random import randint
  2. print("Проверка случайности функции \"randint\" из модуля \"random\" ")
  3. def RD():
  4.     for rand in range(10000):
  5.         print(randint(1, 100))
  6.  
  7. file = open('rannd.txt', 'w')
  8. file = open('rannd.txt', 'a')
  9. file = open('rannd.txt', 'r')
  10. file.write(str(RD()))
  11.  
  12. file1 = input("Открыть файл с 10000 случайных чисел в диапазоне от 1 до 100? Yes/No:")
  13.  
  14. file1 = open('rannd.txt', 'r')
  15.  
  16. if file1 == "No":
  17.     print("Хорошо")
  18. elif file1 == "Yes":
  19.     strings = file.readlines(10000)
  20.     print( strings )
  21.     file.readlines()
  22.     print( strings )
  23.  
  24. import os
  25.  
  26. path = os.path.join(os.path.abspath(os.path.dirname(_file_)), 'rannd.txt')
  27. os.remove(path)
  28.  
  29. input("\n\nНажмите Enter. чтобы выйти.")
RAW Paste Data
Ledger Nano X - The secure hardware wallet
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