Created
November 14, 2022 10:46
-
-
Save yourrocean/a9c5a5d7dbc360dc5fc424d0594ed468 to your computer and use it in GitHub Desktop.
ddd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# # '''import random | |
# # numbers = ['jkhgjh',True] | |
# # for i in range(6): | |
# # numbers.append(random.randint(-10, 10)) | |
# # print(numbers) | |
# # s = [] | |
# # u = 0 | |
# # for i in range(8): | |
# # if type(numbers[i]) == int: | |
# # s.append(numbers[i]) | |
# # print(s) | |
# # | |
# # for i in range(len(s) - 1): | |
# # for j in range(len(s) - i - 1): | |
# # if s[j] > s[j + 1]: | |
# # s[j] , s[j + 1] = s[j + 1] , s[j] | |
# # | |
# # print(s) | |
# # | |
# # import re | |
# # str = 'We four guys, live at 2nd street of Malibeu. I had a cash of $248 in my pocket. I got a ticket with serial number 88796451-52.' | |
# # #search using regex | |
# # count=0 | |
# # x = re.findall('[0-9]+', str) | |
# # print(count) | |
# # print(x)''' | |
# # # count=1 | |
# # # while True: | |
# # # a=int(input('введите число - ')) | |
# # # if a>0: | |
# # # count+=1 | |
# # # elif a==0: | |
# # # break | |
# # # print(f"количество введенных чисел : {count}") | |
# # # while True: | |
# # # b=input() | |
# # # if b=='STOP': | |
# # # break | |
# # # else: | |
# # # print(b) | |
# # # sum=0 | |
# # # while True: | |
# # # c=int(input('введите число - ')) | |
# # # if c>0: | |
# # # sum+=c | |
# # # elif c<0: | |
# # # break | |
# # # | |
# # # print(sum) | |
# # # num=10000 | |
# # # count2=0 | |
# # # p=0.25 | |
# # # while True: | |
# # # num=num+num*p | |
# # # count2+=1 | |
# # # if num>15000: | |
# # # break | |
# # # print(f" cherez {count2} mesyaca summa prevysit 15000") | |
# # # | |
# # # n=int(input()) | |
# # # for i in range(1,101): | |
# # # print(i) | |
# # # if n%i==0: | |
# # # print(f"{n} prostoe chislo") | |
# # # else: | |
# # # continue | |
# # # num=int(input()) | |
# # # reverse_number = 0 | |
# # # n=num | |
# # # while n!=0: | |
# # # | |
# # # rem=n % 10 | |
# # # reverse_number=reverse_number * 10 + rem | |
# # # n=int(n / 10) | |
# # # | |
# # # if num == reverse_number: | |
# # # print("Palindrom") | |
# # # else: | |
# # # print("Ne palindrom") | |
# # import operator | |
# # import datetime | |
# # import operator | |
# # | |
# # | |
# # class Account(): | |
# # def __init__(self, id, name, login, password): | |
# # self.id = id | |
# # self.name = name | |
# # self.login = login | |
# # self.password = password | |
# # | |
# # # класс клиент | |
# # | |
# # def show_maneger(self): | |
# # print(' Имя: {}'.format(self.name)) | |
# # | |
# # class Admin(Account): | |
# # def __init__(self, id, name, login, password): | |
# # super().__init__(id, name, login, password) | |
# # | |
# # def show_admin(self): | |
# # print(' Имя: {}'.format(self.name)) | |
# # | |
# # class Client(Account): | |
# # def __init__(self, id, name, login, password, my_balance, schet, depozit, kredit,second_kredit, zp, percent_bank, timeDay,timeMonth,message=None): | |
# # super().__init__(id, name, login, password) | |
# # self.my_balance = my_balance | |
# # self.schet = schet | |
# # self.depozit = depozit | |
# # self.kredit = kredit | |
# # self.second_kredit = second_kredit | |
# # self.zp = zp | |
# # self.percent_bank = percent_bank | |
# # self.timeDay=timeDay | |
# # self.timeMonth=timeMonth | |
# # self.message=message | |
# # def show_client(self): | |
# # print(' name {}' | |
# # ' schet {}' | |
# # ' depozit {}' | |
# # ' kredit {}' | |
# # ' zp {}' | |
# # ' percent_bank {}' | |
# # ' timeDay {}' | |
# # ' timeMonth {}' | |
# # ' message {}' | |
# # .format(self.name, self.schet, self.depozit, self.kredit, self.zp, self.percent_bank,self.timeDay,self.timeMonth,self.message)) | |
# # date=datetime.date.today() | |
# # | |
# # | |
# # c1 = Client('031113551327', 'Bokeikhan Alisher', 'a', '1', '2016348751234005698', 1000000, 0, 280000,0,0,0) | |
# # c2 = Client('041104651952', 'Tukhpatulla Shara', 'shara_krasavchik', '123456qwerty', '20001234221156785940', 0,250000, 35000,0, 7,date.month) | |
# # c3 = Client('030302551311', 'Kudaibergenov Mukhit', 'yourrocean', 'alishloh', '4400430114001440655', 10000, 0, 36600, 0,0,0) | |
# # e = [c1, c2, c3] | |
# # | |
# # | |
# # # класс менеджер | |
# # class Meneger(Account): | |
# # def __init__(self, id, name, login, password, spisok): | |
# # super().__init__(id, name, login, password) | |
# # self.spisok = spisok | |
# # | |
# # def show_meneger(self): | |
# # print(' spisok {}'.format(self.spisok)) | |
# # | |
# # | |
# # m1 = Meneger('990123556510', 'Markhabai Dauren', 'dauren_m', '123456789000', e) | |
# # m2 = Meneger('041309556211', 'Zhapalov Alkhan', 'zhapalov_a', '1234', e) | |
# # e1 = [m1, m2] | |
# # | |
# # | |
# # class Admin(Account): | |
# # def __init__(self, id, name, login, password, spisok): | |
# # super().__init__(id, name, login, password) | |
# # self.spisok = e | |
# # | |
# # def blok(self): | |
# # print('чей счет хотите заблокировать ') | |
# # a = input() | |
# # for i in e: | |
# # if a == i.id: | |
# # e.pop(i) | |
# # print(e) | |
# # | |
# # def udalit(self): | |
# # print('кого хотите удалить?') | |
# # b = input() | |
# # for i in e: | |
# # if b == i.id: | |
# # e.clear() | |
# # print(e) | |
# # | |
# # def kosu(self, e): | |
# # e = [] | |
# # c4 = Client(self.id(input()), self.name(input()), self.schet(int(input()))) | |
# # for i in e: | |
# # e.append() | |
# # | |
# # def show_admin(self): | |
# # print(' id {}' | |
# # ' name {}' | |
# # ' spisok {}'.format(self.id, self.name, self.spisok)) | |
# # | |
# # | |
# # a1 = Admin('125689112354', 'Serikbay Khusein', 'serikbayy', '147852369', e) | |
# # a2 = Admin('042501568974', 'Marat Tileubek', 'm', 'q', e) | |
# # e2=[a1,a2] | |
# # | |
# # while True: | |
# # print('1. Meneger') | |
# # print('2. Admin') | |
# # print('3. Client') | |
# # print('4. exit') | |
# # n = int(input()) | |
# # if n == 1: | |
# # login = input('Введите логин ') | |
# # parol = input('Введите пароль ') | |
# # if login == e1[0].login and parol == e1[0].password or login == e1[1].login and parol == e1[1].password: | |
# # while True: | |
# # print('1. Посомтреть клиентов у которых есть депозит') | |
# # print('2. Просмотр клиентов у которых есть кредит') | |
# # print('3. exit') | |
# # num = int(input()) | |
# # if num == 1: | |
# # for i in e: | |
# # if i.depozit > 0: | |
# # i.show_client() | |
# # elif num == 2: | |
# # for i in e: | |
# # if i.kredit > 0: | |
# # i.show_client() | |
# # elif num == 3: | |
# # break | |
# # # менеджеры | |
# # if n == 2: | |
# # cheker = 0 | |
# # login = input('Введите логин ') | |
# # parol = input('Введите пароль ') | |
# # for i in e2: | |
# # if login == i.login and parol == i.password: | |
# # | |
# # while True: | |
# # print('1. Заблокировать счет') | |
# # print('2. Заморозить депозит') | |
# # print('3. exit') | |
# # num = int(input()) | |
# # if num == 1: | |
# # | |
# # name = input('Введите имя человека чей счет вам надо заблокировать') | |
# # for i in e: | |
# # | |
# # if name==i.name: | |
# # print('Счет', i.name, 'заблокирован') | |
# # i.message="Block" | |
# # else: | |
# # print('Введите имя правильно') | |
# # elif num == 2: | |
# # name = input('Введите имя человека чей депозит надо заморозить') | |
# # for i in e: | |
# # if name.lower() == e[i].name.lower(): | |
# # | |
# # cheker = 1 | |
# # if cheker == 1: | |
# # print('Депозит', i.name, 'был заморожен') | |
# # else: | |
# # print('Введите имя правильно') | |
# # elif num==3: | |
# # break | |
# # | |
# # if n == 3: | |
# # login = input('Введите логин ') | |
# # parol = input('Введите пароль ') | |
# # for i in e: | |
# # if i.password == parol and i.login == login: | |
# # i.show_client() | |
# # | |
# # while True: | |
# # print('1. Узнать номер счета') | |
# # print('2. Есть ли у меня кредит') | |
# # print('3. exit') | |
# # num = int(input()) | |
# # if num == 1 and i.message!="Block": | |
# # | |
# # print(i.schet) | |
# # | |
# # elif num == 2 and i.message!="Block" : | |
# # | |
# # if i.kredit > 0: | |
# # cheker = 1 | |
# # if cheker == 1: | |
# # print(i.kredit) | |
# # else: | |
# # print('У вас нету кредита') | |
# # elif num == 3: | |
# # break | |
# # elif i.message=="Block": | |
# # print("Block") | |
# # if n == 4: | |
# # break | |
# # | |
# import datetime | |
# import operator | |
# vremya=datetime.datetime.now() | |
# | |
# | |
# class Account(): | |
# def __init__(self, id, name, login, password): | |
# self.id = id | |
# self.name = name | |
# self.login = login | |
# self.password = password | |
# | |
# | |
# class Maneger(Account): | |
# def __init__(self, id, name, login, password): | |
# super().__init__(id, name, login, password) | |
# | |
# def show_maneger(self): | |
# print(' Имя: {}'.format(self.name)) | |
# | |
# class Admin(Account): | |
# def __init__(self, id, name, login, password): | |
# super().__init__(id, name, login, password) | |
# | |
# def show_admin(self): | |
# print(' Имя: {}'.format(self.name)) | |
# | |
# class Client(Account): | |
# def __init__(self, id, name, login, password, my_balance, schet, depozit, kredit, second_kredit, zp, timeday, timemonth, massage = None): | |
# super().__init__(id, name, login, password) | |
# self.my_balance = my_balance | |
# self.schet = schet | |
# self.depozit = depozit | |
# self.kredit = kredit | |
# self.second_kredit = second_kredit | |
# self.zp = zp | |
# self.timeday = timeday | |
# self.timemonth = timemonth | |
# self.massage = massage | |
# | |
# def show_client(self): | |
# print(' ИИН: {}' | |
# ' Имя: {}' | |
# ' Личный счет: {}' | |
# ' Депозит: {}' | |
# ' Кредит: {}' | |
# ' salary: {}' | |
# ' Второй кредит: {}' | |
# ' День оплаты: {}' | |
# ' Месяц оплаты: {}'.format(self.id,self.name, self.my_balance, self.depozit, self.kredit,self.zp, self.second_kredit, self.timeday, self.timemonth)) | |
# | |
# | |
# # КЛИЕНТЫ | |
# c1 = Client('031113551327', 'Бокейхан Алишер', 'ba', '1', 100000, 1200000, 4000000, 3000000, 0, 36600, 10,12) | |
# c2 = Client('041236547859', 'Кудайбергенов Мухит', 'km', '2', 126547, 1199999, 3250000, 0, 0, 200000, 11,11) | |
# c3 = Client('041104556984', 'Тухпатулла Шара', 'ts', '3', 500000, 2500000, 6000000, 1500000, 0, 13000, 7,10) | |
# e = [c1, c2, c3] | |
# | |
# # МЕНЕДЖЕРЫ | |
# m1 = Maneger('021456398745', 'Муратов Алихан', 'ma', '4') | |
# m2 = Maneger('125478632148', 'Марат Тилеубек', 'mt', '5') | |
# e1 = [m1, m2] | |
# | |
# # АДМИНЫ | |
# a1 = Admin('214569874521', 'Жапалов Альхан', 'ja', '6') | |
# a2 = Admin('365214785698', 'Серикбай Хусейн', 'skh', '7') | |
# e2 = [a1, a2] | |
# | |
# while True: | |
# print('1. Client') | |
# print('2. Maneger') | |
# print('3. Admin') | |
# print('4. exit') | |
# num = int(input()) | |
# if num == 1: | |
# login = input('Введите логин ') | |
# parol = input('Введите пароль') | |
# for i in e: | |
# if i.login == login and i.password == parol: | |
# i.show_client() | |
# | |
# while True: | |
# print('1. Погасить кредит') | |
# print('2. перевод между счетами') | |
# print('3. взять кредит') | |
# print('4. проверить просрочку кредита') | |
# print('5. Проверить есть ли у меня кредит') | |
# print('6. Выход ') | |
# n = int(input()) | |
# if n == 1 and i.massage != "Block": | |
# tg = int(input('введите сумму погашения ')) | |
# e[index].kredit = e[index].kredit - tg | |
# e[index].show_client() | |
# elif n == 2 and i.massage != "Block": | |
# while True: | |
# print('1. перевести с счета на депозит') | |
# print('2. перевести с депозита на счет') | |
# print('3. exit') | |
# n = int(input()) | |
# if n == 1: | |
# tg = int(input('сумма перевода ')) | |
# e[index].depozit += tg | |
# e[index].schet -= tg | |
# e[index].show_client() | |
# elif n == 2: | |
# tg = int(input('сумма перевода ')) | |
# e[index].depozit -= tg | |
# e[index].schet += tg | |
# e[index].show_client() | |
# elif n == 3: | |
# break | |
# elif n == 3 and i.massage != "Block": | |
# print('вы точно уверены что ъотите взть второй кредит? (да \ нет)') | |
# answer = input() | |
# if answer.lower() == 'да' or answer.lower() == 'yes': | |
# if e[index].zp > 250000: | |
# print('мы можем вам оформить еще кредит') | |
# kredit_second = int(input('сумма второго кредита ')) | |
# e[index].second_kredit = kredit_second | |
# e[index].show_client() | |
# else: | |
# print('у вас не достоточная зароботная плата для погашение второго кредита, мы вам его не одобряем') | |
# else: | |
# print('хорошо, оформлять не будем') | |
# elif n == 4 and i.massage != "Block": | |
# for i in e: | |
# if i.timeday and i.timemonth > vremya: | |
# print('у вас просрочка') | |
# elif i.timeday and i.timemonth < vremya: | |
# print('раскидайте долг, иначе коллектор приедет <3') | |
# else: | |
# print('все ок') | |
# | |
# elif num == 5 and i.massage != "Block": | |
# for i in e: | |
# if i.kredit > 0: | |
# print('summma vaeshego kredita:', i.kredit) | |
# else: | |
# print('У вас нету кредита') | |
# | |
# elif i.massage == "Block": | |
# print("Block") | |
# elif n == 6: | |
# break | |
# elif num == 2: | |
# login = input('Введите логин ') | |
# parol = input('Введите пароль ') | |
# for i in range(len(e1)): | |
# if e1[i].login == login and e1[i].password == parol: | |
# e1[i].show_maneger | |
# index = i | |
# while True: | |
# print('1. клиенты у кого есть депозит') | |
# print('2. клиенты у кого просрочена деь оплаты кредита') | |
# print('3. выход') | |
# num = int(input()) | |
# if num == 1: | |
# for i in e: | |
# if i.depozit > 0: | |
# i.show_client | |
# # elif num == 2: | |
# # for i in e: | |
# # if i.time | |
# elif num == 3: | |
# login = input('Введите логин ') | |
# parol = input('Введите пароль ') | |
# for i in e2: | |
# if login == i.login and parol == i.password: | |
# | |
# while True: | |
# print('1. Заблокировать счет') | |
# print('2. Заморозить депозит') | |
# print('3. exit') | |
# num = int(input()) | |
# if num == 1: | |
# | |
# name = input('Введите имя человека чей счет вам надо заблокировать') | |
# for i in e: | |
# | |
# if name == i.name: | |
# print('Счет', i.name, 'заблокирован') | |
# i.message = "Block" | |
# break | |
# else: | |
# print('Введите имя правильно') | |
# elif num == 2: | |
# name = input('Введите имя человека чей депозит надо заморозить') | |
# for i in e2: | |
# if name.lower() == i.name.lower(): | |
# index = i | |
# cheker = 1 | |
# if cheker == 1: | |
# print('Депозит', i.name, 'был заморожен') | |
# else: | |
# print('Введите имя правильно') | |
# elif num == 3: | |
# break | |
# | |
# elif num == 4: | |
# break | |
# import random | |
# | |
# class Coll(): | |
# | |
# | |
# | |
# def my_coll(a): | |
# for i in range(len(a)): | |
# | |
# print('1.Добавить элемент') | |
# print('2.Удалить элемент') | |
# print('3.Определить тип элемента') | |
# print('4.Counter') | |
# print('5.Copy') | |
# print('6.Exit') | |
# | |
# n=int(input()) | |
# if n==1: | |
# a.append(int(input('Vvedite chislo: '))) | |
# print(a) | |
# elif n==2: | |
# print(a) | |
# b=int(input('Delete element po index:')) | |
# a.pop(b) | |
# print(a) | |
# elif n==3: | |
# arr=[] | |
# intarr=[] | |
# floatarr=[] | |
# strarr=[] | |
# | |
# for i in range(len(a)): | |
# if type(a[i])==int: | |
# intarr.append(a[i]) | |
# elif type(a[i])==float: | |
# floatarr.append((a[i])) | |
# elif type(a[i])==str: | |
# strarr.append((a[i])) | |
# print('int:',intarr) | |
# print('float:',floatarr) | |
# print('string:',strarr) | |
# elif n==4: | |
# arr=[] | |
# for i in range(5): | |
# arr.append(random.randint(5,20)) | |
# print(arr) | |
# print(max(arr, key=arr.count)) | |
# | |
# elif n==5: | |
# random.shuffle(a) | |
# print(a) | |
# | |
# | |
# elif n==7: | |
# break | |
# | |
# else: | |
# print('Vvedite norm chislo') | |
# print(a) | |
# m=int(input('kol cikla:')) | |
# a=[] | |
# for i in range(m): | |
# | |
# a.append(int(input('Napishi int chislo:'))) | |
# a.append(input('Napishi slovo:')) | |
# a.append(float(input('napishi float chislo:'))) | |
# print(a) | |
# my_coll(a) | |
import random | |
# class Set: | |
# def __init__(self,a,b): | |
# self.a=a | |
# self.b=b | |
# | |
# | |
# def pop(self,list,nPop): | |
# print(list) | |
# try: | |
# list.pop(nPop) | |
# except: | |
# print("That index is not exist") | |
# print(list) | |
# | |
# def add(self,list,nAdd): | |
# | |
# list.append(nAdd) | |
# return a.sett(list) | |
# | |
# | |
# | |
# | |
# def union(self,list,list2): | |
# list3=[] | |
# list3=list+list2 | |
# return a.sett(list3) | |
# | |
# | |
# def difference(self,list,list2): | |
# list3=[] | |
# list4=[] | |
# print(list2) | |
# for i in range(len(list)): | |
# count=0 | |
# for j in range(len(list2)): | |
# if list[i]==list2[j]: | |
# count+=1 | |
# if count == 1: | |
# break | |
# if count ==0: | |
# list3.append(list[i]) | |
# for i in range(len(list2)): | |
# count1=0 | |
# for j in range(len(list)): | |
# if list2[i]==list[j]: | |
# count1+=1 | |
# if count1 == 1: | |
# break | |
# if count1 == 0: | |
# list4.append(list2[i]) | |
# print("a.difference(b) = ",list3) | |
# print("b.difference(a) = ",list4) | |
# | |
# | |
# | |
# | |
# def intersection(self,list,list2): | |
# list3=[] | |
# for i in range(len(list)): | |
# count=0 | |
# for j in range(len(list2)): | |
# if list[i]==list2[j]: | |
# count+=1 | |
# if count==1: | |
# list3.append(list[i]) | |
# a.sett(list3) | |
# | |
# | |
# | |
# | |
# def sett(self,list): | |
# #12 12 13 14 | |
# for i in range(len(list)): | |
# count = 0 | |
# for j in range(len(list)): | |
# if list[i]==list[j]: | |
# count+=1 | |
# if count==2: | |
# list.pop(j) | |
# return a.sett(list) | |
# list=sorted(list) | |
# print(list) | |
# | |
# | |
# | |
# def main(self): | |
# n=int(input("Enter n: ")) | |
# list=[] | |
# for i in range(n): | |
# i=int(input("Enter element: ")) | |
# list.append(i) | |
# print(list) | |
# a.sett(list) | |
# | |
# while True: | |
# print("1.pop\n2.add\n3.union\n4.difference\n5.intersection") | |
# try: | |
# n = int(input("Enter n: ")) | |
# except ValueError: | |
# print("Please try again") | |
# else: | |
# if n == 1: | |
# while True: | |
# try: | |
# nPop=int(input("Enter index element: ")) | |
# except ValueError: | |
# print("Please try again") | |
# else: | |
# a.pop(list,nPop) | |
# break | |
# elif n == 2: | |
# while True: | |
# try: | |
# nAdd=int(input("add new element: ")) | |
# except ValueError: | |
# print("Please try again") | |
# else: | |
# a.add(list,nAdd) | |
# | |
# elif n == 3: | |
# nSizeNewMass=int(input("Enter size new set: ")) | |
# list2=[] | |
# for i in range(nSizeNewMass): | |
# nElement=int(input("Enter elements: ")) | |
# list2.append(nElement) | |
# a.sett(list2) | |
# a.union(list,list2) | |
# elif n == 4: | |
# nSizeNewMass = int(input("Enter size new set: ")) | |
# list2 = [] | |
# for i in range(nSizeNewMass): | |
# nElement = int(input("Enter elements: ")) | |
# list2.append(nElement) | |
# a.difference(list,list2) | |
# elif n==5: | |
# nSizeNewMass = int(input("Enter size new set: ")) | |
# list2 = [] | |
# for i in range(nSizeNewMass): | |
# nElement = int(input("Enter elements: ")) | |
# list2.append(nElement) | |
# a.intersection(list,list2) | |
# else: | |
# print("Please try again") | |
# a=Set(2,3) | |
# a.main() | |
# import random | |
# a=[] | |
# for i in range(13): | |
# a.append(random.randint(1,1001)) | |
# print(a) | |
# b=[] | |
# for i in range(len(a)): | |
# if a[i]%10==0: | |
# print('X') | |
# elif a[i]%1000==0: | |
# print('M') | |
# elif a[i]%100==0: | |
# print('C') | |
# print(b) | |
# a=['coffe','milk','coffe','pen','milk','coke','coke','book','pen','book','pen','paper cup','coffe','coffe'] | |
# item={} | |
# for i in range(len(a)): | |
# item[i]=a.count(i) | |
# for k, v in item.items(): | |
# print(k,':',v) | |
# import random | |
# print('-'.join('012.545.545'.split('.'))) | |
# s='hello' | |
# d=(list(s)) | |
# print(d) | |
# print(''.join(d)) | |
# print(s.capitalize()) | |
# c='abcd' | |
# print(c.startswith('b',1)) | |
# print(c.endswith('a',0)) | |
# text='123,1314,5156' | |
# aa=text.replace(',','') | |
# print(aa) | |
# a=[] | |
# keys=[31,324,53,5] | |
# keY=['january','m','g','f'] | |
# for i in range(len(keys)): | |
# keY.fromkeys(keys,i) | |
# print(keY) | |
from collections import defaultdict | |
import datetime | |
import time | |
import random | |
n=datetime.datetime.now() | |
print(n) | |
c=n.replace(year=2004,month=4,day=18) | |
print(c) | |
d=n-c | |
print(d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey