Advertisement
Guest User

rrr

a guest
Oct 5th, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. import math
  2. import random
  3. a = input("create chislo: ")
  4. b = random.randint(1,5000)
  5. c = random.randint(1,5000)
  6. class pribavit:
  7. def myfunc (self, x, y):
  8. ss = int(y) + int(x)
  9. while ss < c:
  10. print(ss)
  11. ss = ss + 1
  12. print("result is ", ss)
  13. input("Exit?: ")
  14.  
  15. return ss
  16. object1 = pribavit()
  17. text = object1.myfunc(a, b)
  18. spisok = str(text)
  19.  
  20. class napisatel:
  21. def pisat(self, pismo):
  22. f = open("znachenie.txt", "w")
  23. f.write(pismo)
  24. f.close()
  25. print("zapis osushestvlenna")
  26. def pisat2(self, pismo):
  27. f = open("znav.pdf", "w")
  28. f.write(pismo)
  29. f.close()
  30. print("zapis osushestvlenna")
  31.  
  32. napisat1 = napisatel()
  33. #napisat1.pisat2(spisok)
  34.  
  35. class rasshiren(napisatel):
  36. def pisat3(self, pismo):
  37. f = open("znav.fb2", "w")
  38. f.write(pismo)
  39. f.close()
  40. print("zapis osushestvlenna")
  41.  
  42. rasobject1 = rasshiren()
  43. rasobject1.pisat(spisok)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement