Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- import random
- a = input("create chislo: ")
- b = random.randint(1,5000)
- c = random.randint(1,5000)
- class pribavit:
- def myfunc (self, x, y):
- ss = int(y) + int(x)
- while ss < c:
- print(ss)
- ss = ss + 1
- print("result is ", ss)
- input("Exit?: ")
- return ss
- object1 = pribavit()
- text = object1.myfunc(a, b)
- spisok = str(text)
- class napisatel:
- def pisat(self, pismo):
- f = open("znachenie.txt", "w")
- f.write(pismo)
- f.close()
- print("zapis osushestvlenna")
- def pisat2(self, pismo):
- f = open("znav.pdf", "w")
- f.write(pismo)
- f.close()
- print("zapis osushestvlenna")
- napisat1 = napisatel()
- #napisat1.pisat2(spisok)
- class rasshiren(napisatel):
- def pisat3(self, pismo):
- f = open("znav.fb2", "w")
- f.write(pismo)
- f.close()
- print("zapis osushestvlenna")
- rasobject1 = rasshiren()
- rasobject1.pisat(spisok)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement