-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdogumyili_sifre_benzerligi.py
More file actions
36 lines (33 loc) · 1.21 KB
/
dogumyili_sifre_benzerligi.py
File metadata and controls
36 lines (33 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import time
import os
def clear():
os.system('cls')
print("Doğum tarihinizi giriniz")
gun = input("Gün (gg): ")
ay = input("Ay (aa): ")
yil = input("Yıl (yyyy): ")
while True:
for i in range(10):
time.sleep(.3)
print(".",end="",flush=True)
clear()
sifre = input("\n4 haneli bir şifre giriniz: ")
if len(sifre) == 4:
if sifre.startswith("0"):
print("Şifreniz 4 haneli olmak zorunda olduğu için ilk hanesi '0' olamaz!")
continue
elif int(sifre)-1234 == 0 or (int(sifre)-1234)%1111 == 0 or int(sifre)-8765 == 0 or (int(sifre)-8765)%1111 == 0:
print("Birbiriniz takip eden rakamları şifrenizde kullanmayınız!")
continue
elif int(sifre)%1111 == 0:
print("Şifreniz aynı rakamlardan oluşamaz!")
continue
elif sifre == (gun+ay) or sifre == (ay+yil) or sifre == (gun+yil) or sifre == (yil):
print("Güvenlik açısından doğum tarihinizi şifre olarak kullanmayınız!")
continue
if len(sifre) != 4:
print("Şifreniz 4 haneli olmak zorunda!")
continue
else:
print("Giriş Başarılı!")
break