-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2.hafta
409 lines (342 loc) · 16.1 KB
/
2.hafta
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# 1--------------------BURC------------------------
w="0123456789"
print("""BURCUNUZU OGRENMEK ISTERMISINIZ?
DOGUM TARIHINIZI
GUN
AY (ayin ismi veya 3 veya 04 gibi girebilirsiniz)
OLARAK GIRINIZ BURCUNUZU OGRENINIZ
""")
#########################GUN VE AY ICIN INPUT AYARLAMALARI##############################
while True:
print("\n************Cikmak icin 'Q'ya basin*************")
g = input("\nGUN :")# GUN ICIN INPUT
if g=="": #bos gecilirse veya entere basilirsa tekrar basa donder
print('lutfen sayi giriniz')
continue
if g=="q" or g=="Q" :
print("***************cikiliyor.....***************")
break
if not int(g) in range(32) :
print('lutfen 1-31 arasinda sayi giriniz')
continue
a = input("AY :") # AY ICIN INPUT
if a=="": #bos gecilirse veya entere basilirsa tekrar basa donder
print('lutfen ayi giriniz')
continue
#################################BURCLARI TANIMLAMA ####################################
#--------------------------------KOC---------------------------------------------------
if (0 < int(g) < 21 and (a == "nisan" or a == "NISAN"or a == "4" or a == "04")) or \
(20 < int(g) < 32 and (a == "mart" or a == "MART" or a == "3" or a == "03")):
print("***********BURCUNUZ KOC***************")
#---------------------------------BOGA---------------------------------------------------
elif (0 < int(g) < 22 and (a == "mayis" or a == "MAYIS"or a == "5" or a == "05")) or \
(20 < int(g) < 31 and (a == "nisan" or a == "NISAN"or a == "4" or a == "04")):
print("************BURCUNUZ BOGA**************")
# ---------------------------------IKIZLER---------------------------------------------------
elif (0 < int(g)< 22 and (a == "HAZIRAN" or a == "haziran"or a == "6" or a == "06")) or \
(21 < int(g) < 32 and (a == "mayis" or a == "MAYIS"or a == "5" or a == "05")):
print("***********BURCUNUZ IKIZLER************")
# ---------------------------------YENGEC---------------------------------------------------
elif (0 < int(g)< 24 and (a == "temmuz" or a == "TEMMUZ"or a == "7" or a == "07")) or \
(21 < int(g)< 31 and (a == "HAZIRAN" or a == "haziran"or a == "6" or a == "06")):
print("***********BURCUNUZ YENGEC*************")
# ---------------------------------ASLAN---------------------------------------------------
elif (0 < int(g) < 22 and (a == "AGUSTOS" or a == "agustos"or a == "8" or a == "08")) or \
(23 < int(g) < 32 and (a == "temmuz" or a == "TEMMUZ"or a == "7" or a == "07")):
print("***********BURCUNUZ ASLAN**************")
# ---------------------------------BASAK---------------------------------------------------
elif (0 < int(g) < 24 and (a == "eylul" or a == "EYLUL"or a == "9" or a == "09")) or \
(21 <int(g) < 32 and (a == "AGUSTOS" or a == "agustos"or a == "8" or a == "08")):
print("***********BURCUNUZ BASAK**************")
# ---------------------------------TERAZI---------------------------------------------------
elif (0 < int(g) < 24 and (a == "EKIM" or a == "ekim"or a == "10" or a == "10")) or \
(22 < int(g)< 31 and (a == "eylul" or a == "EYLUL"or a == "9" or a == "09")):
print("***********BURCUNUZ TERAZI*************")
# ---------------------------------AKREP---------------------------------------------------
elif (0 < int(g) < 24 and (a == "KASIM" or a == "kasim"or a == "11" or a == "11")) or \
(23< int(g)< 32 and (a == "EKIM" or a == "ekim"or a == "10" or a == "10")):
print("***********BURCUNUZ AKREP**************")
# ---------------------------------YAY---------------------------------------------------
elif (0 < int(g) < 24 and (a == "ARALIK" or a == "aralik"or a == "12" or a == "12")) or \
(23< int(g) < 31 and (a == "KASIM" or a == "kasim"or a == "11" or a == "11")):
print("***********BURCUNUZ YAY****************")
# ---------------------------------OGLAK---------------------------------------------------
elif (0 < int(g)< 21 and (a == "OCAK" or a == "ocak"or a == "01" or a == "1")) or \
(22< int(g) < 32 and (a == "ARALIK" or a == "aralik"or a == "12" or a == "12")):
print("***********BURCUNUZ OGLAK**************")
# ---------------------------------KOVA---------------------------------------------------
elif (0 < int(g)< 20 and (a == "SUBAT" or a == "subat"or a == "02" or a == "2")) or \
(20< int(g) < 32 and (a == "OCAK" or a == "ocak"or a == "01" or a == "1")):
print("***********BURCUNUZ KOVA***************")
# ---------------------------------BALIK---------------------------------------------------
elif (0 < int(g) < 21 and (a == "MART" or a == "mart"or a == "03" or a == "3")) or \
(19< int(g) < 30 and (a == "SUBAT" or a == "subat"or a == "02" or a == "2")):
print("***********BURCUNUZ BALIK**************")
else :
print("Lutfen girdiginiz GUN ve AY degerlerini konrtol edip tekrar deneyiniz.....")
#2-------------------------------------KM-MIL DONUSUM PROGRAMI----------------------
while True:
##############SECME INPUTU########################
secim=input("\nKM - MIL donusumu icin: K\n"
"MIL - KM donusumu icin: M"
"\ncikis icin : Q "
"\nbasiniz : " )
if secim=="q" or secim=="Q" :
print("kapaniyor....")
break
####################KM-MIL########################m
elif secim=="k" or secim=="K" :
###########KM INPUTU########
uzunluk_km=float(input("uzunlugu KM giriniz :"))
sayi=uzunluk_km*0.62 #1km=0.62 mil
print(uzunluk_km,"KM",sayi,"MIL eder" )
####################MIL-KM########################
elif secim=="m" or secim=="M" :
############MIL INPUTU#######
uzunluk_mil=float(input("uzunlugu MIL giriniz :"))
sayi=uzunluk_mil*1.61 #1mil=1.61 km
print(uzunluk_mil,"MIL",sayi," KM eder")
else :
print("\nlutfen dogru secimi yapiniz")
#3A-----------------------------------EN AZ BIR RAKAM BIR K.HARF BIR B.HARF PAROLA OLUSTURMA--------------------
print("""
lutfen parola olusturuken enaz
1 buyuk harf
1 kucuk harf
1 rakam
giriniz""")
while True:
########## KONTROL DEGISKENLERI ###############
kontrol_x = 0
kontrol_y = 0
kontrol_z = 0
n = 0
############## KARAKTER TANIMLAMALARI ################
rakam = "1234567890"
k_harf = "qwertyuiopasdfghjklzxcvbnm"
b_harf = "QWERTYUIOPLKJHGFDSAZXCVBNM"
################ GIRIS INPUTU ############################
a = input("""cikis icin : "q"
yeni parola :""")
d = len(a) #girilen parolanin uzunlugu
################ CIKIS #################
if a=="q" :
print("\ncikilkiyor.........")
break
############## KOSULLAR ###################
if not 6 < len(a) < 13:
print("lutfen 6-12 karakterli parola olusturunuz\n")
continue
###############! BURAYA DIKKAT ! ###############################################
for i in a: #i input(a) nin icerisini konrol eder
n += len(i) #len(i) her seferde 1 karakteri dolasirken 'n' degeri
#bir artacak taki inputa girilen karakter kadar
############# EN AZ BIR KARAKTER KONTROLU#############
if kontrol_x < 1: # baslangicda x=0 oldugu icin
#eger i degeri b_harf icerisini
if (i in b_harf): #kontrol eder varsa kontrol_x=1
#olur ve if kosuluna girmez
kontrol_x += 1
# _________________________________________________________________________
if kontrol_y < 1: # baslangicda kontrol_y=0 oldugu
#icin eger i degeri k_harf icerisini
if (i in k_harf): #kontrol eder varsa kontrol_y=1
#olur ve if kosuluna girmez
kontrol_y += 1
# _____________________________________________________________________________
if kontrol_z < 1: # baslangicda kontrol_z=0
#oldugu icin eger i degeri k_harf icerisini
#kontrol eder varsa kontrol_z=1
#olur ve if kosuluna girmez
if (i in rakam ):
kontrol_z+= 1
# _______________________________________________________________________________
if n == d and (kontrol_x == kontrol_y == kontrol_z == 1):
print("parolaniz kaydediliyor.......\n")
break
else:
if n == d and (kontrol_x != 1 or kontrol_y != 1 or kontrol_z != 1):
print("Lutfen buyuk harf Kucuk harf ve rakam",
"\ngirdiginizden emin olun\n")
#3B----------------------------KULLANICI ADI VE PAROLA BELIRLEME---------------------------------------
rakamlar= "1234567890"
kontrol= 0
print("""KULLANICI ADI ICIN ""RAKAM"" GIRMEYINIZ VE 3-18 KARAKTER OLMASINA DIKKAT EDINIZ.
PAROLA 6-12 KARAKTER OLMASINA DIKKAT EDINIZ
CIKIS ICIN "Q" YA BASIN """)
################ KULLANICI GIRIS #################################33
while True:
kulllanici_adi = input("\n Kullanici Adi "
"\n(cikis icin 'q') :")
if kulllanici_adi=="q" or kulllanici_adi=="Q" :
print("programdan cikiliyor......")
break
################### KARAKTER SAYISI KONTROLU ######################
if not 2 < len( kulllanici_adi) < 19:
print("\nHata: Kullanici adi 3-18 karakter olmali")
continue
################### RAKAM KONTROL #################################
for x in rakamlar:
if x in kulllanici_adi:
print("\nHata: Rakam olmamali")
kontrol = 1
break
if kontrol == 1:
kontrol = 0
continue
##########################################################
else:
print("kullanici adini basariyla girdiniz")
#################### PAROLA BOLUMU ##########################
while True:
parola = input("\nPAROLANIZI OLUSTURUNUZ"
"\ncikis icin 'q' :")
################PROGRAMDAN CIKIS##########################
if parola == "q" or parola == "Q":
print("programdan cikiliyor......")
quit()
################## PAROLA SAYISI KONTROLU ###################
if not 5 < len(parola) < 13:
print("\nHata: Parola 6-12 karakter olmali")
continue
###########################################################
else:
print("Parolaniz kaydediliyor....")
break
############### PRINT VE DOSYA ISLEMLERI #####################
while True:
print("\nKULLANICI ADI :", kulllanici_adi,
"\nPAROLA :", parola)
kaydet = open("kaydet.txt", "w")
print("KULLANICI ADI :", kulllanici_adi,
"\nPAROLA :", parola, file=kaydet)
kaydet.close()
break
#4----------------------------TAHMIN OYUNU ---------------------------------------
f=0
while True:
################# TAHMIN SAYISI HAZIRLAMA ##############3
karma=input('\n'"""TAHMIN SAYISI OLUSTURMAK ICIN CANIN NE ISTIYORSA YAZ KARDESIM
cikmak icin 'q' ye bas """'\n')
if karma == "q" or karma == "Q":
print("...............Game Over..........")
break
################ KARMA YAPMA ###########
i=0
s=len(karma)
f+=1
if f==1 :
tahmin_olunan=(s**21)%10
# print("a",tahmin_olunan)
if f==2 :
tahmin_olunan=(s+77)%10
if f==3 :
tahmin_olunan=(s*59)%10
f=0
#print("x",tahmin_olunan)
################### OYUNA GIRIS #################
print("\n-------------SAYIYI TAHMIN OYUNU--------------\n")
secim = input("""_________HAZIRLANIYOR_________________
BASLAMAK ICIN LUTFEN "B" YE BASIN
cikmak icin 'q' ye bas"""'\n')
if secim == "q" or secim == "Q":
print("...............Game Over..............")
break
if secim == "B" or secim == "b":
################ TAHMIN KOSULLARI #############
while True:
tahmin_edilen = input("\ntahmininizi giriniz:")
i += 1
if i == 1 and tahmin_edilen == str(tahmin_olunan):
print("\n.............tebrikler *** kazandiniz...........",i,".tahmin")
i = 0
break
elif 1 < i < 4 and tahmin_edilen == str(tahmin_olunan):
print("\n..............tebrikler ** kazandiniz...........",i,".tahmin")
i = 0
break
elif 3 < i < 6 and tahmin_edilen == str(tahmin_olunan):
print("\n.........tebrikler * kazandiniz.......",i,".tahmin")
i = 0
break
elif i > 5:
i = 0
print("uzgunum bilemediniz dogru cevap", tahmin_olunan)
break
else:
print("________B veya Q ya basiniz______________\n")
#5---------------------ATM PROGRAMI-------------------------------------------
paracekme=0
parayatirma=0
bakiye=1000
print("Sayin N.JANSEN hosgeldiniz ")
print("""
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""")
print("Sayin N.JANSEN hesabinizda ",bakiye,"TL vardir")
print("""
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""")
while True :
##########################giris#######################
print("\nLutfen Yapmak istediginiz islemi seciniz"
"\n Bakiye sorgulama >>> 1 2 <<< Para Cekme"
"\n Para yatirma >>> 3 4 <<< Cikis")
giris=input("\nislem no :")
#########################cikis#####################
if giris=="4" :
cikis=input("cikmak istediginize eminmisiniz"
"\ndevam etmek icin >>> 1 2 <<< cikis \n")
if cikis=="1" :
print("ana ekrana yonlendiriliyorsunuz lutfen bekleyiniz....")
continue
elif cikis=="2":
print("Hoscakalin sayin N.JANSEN .......... ")
break
#######################bakiye##########################
if giris=="1" :
print("""
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""")
print("Sayin N.JANSEN hesap bakiyeniz :",bakiye,"TL")
print("""
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""")
print('lutfen bekleyiniz ana ekrana yonlendiriliyorsunuz....')
print("""
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""")
continue
#####################paracekme#########################
elif giris=="2" :
print("""
>>>>>>>>>>>>>>>>>>>>>>>>>>>""")
paracekme=float(input("\ncekmek istediginiz tutari giriniz :"))
if paracekme>bakiye :
print("""
>>>>>>>>>>>>>>>>>>>>>>>>>>>""")
print("Bu miktarda cekemezsiniz ana ekrana yonlendiriliyorsunuz lutfen bekleyiniz... ")
continue
else :
bakiye=bakiye-paracekme
print("""
>>>>>>>>>>>>>>>>>>>>>>>>>>>""")
print("cekilen miktar",paracekme,"TL")
print("hesap bakiyeniz",bakiye,"TL")
print("""
>>>>>>>>>>>>>>>>>>>>>>>>>>>""")
print("ana ekrana yonlendiriliyorsunuz lutfen bekleyiniz....")
continue
#####################para yatirma#####################
elif giris == "3":
print("""
>>>>>>>>>>>>>>>>>>>>>>>>>>>""")
parayatirma = float(input("\nyatirmak istediginiz tutari giriniz :"))
print("""
>>>>>>>>>>>>>>>>>>>>>>>>>>>""")
print("yatirilan tutar",parayatirma,"TL")
bakiye=bakiye+parayatirma
print("hesap bakiyeniz", bakiye, "TL")
print("""
>>>>>>>>>>>>>>>>>>>>>>>>>>>""")
print("ana ekrana yonlendiriliyorsunuz lutfen bekleyiniz....")
continue
###########################degilse durumu##########################
else:
print("yanlis tusa bastiniz lutfen tekrar deneyiniz")
pass