 Merhabalar Python programlama derslerinin bu bölümünde _all()_ fonksiyonundan bahsedeceğiz. _all_ kelimesi Türkçede hepsi anlamına gelmektedir. _all()_ fonksiyonu da ismi ile benzer bir işleve sahiptir. _all()_ fonksiyonu, dizisel bir yapı içerisindeki tüm değerler _True_ ise True değerini döndürürken, bu değerlerden herhangi biri _False_ olduğu durumda False değerini döndürür. _all()_ fonksiyonunun çalışma mantığı bu şekildedir. _all()_ fonksiyonunun kullanımına geçmeden önce böyle bir uygulamayı fonksiyon olmadan nasıl yaparız görelim :  _all()_ fonksiyonunu kendimiz tanımlamış olsaydık yukarıdakine benzer bir fonksiyon oluşturmamız gerekirdi. Fonksiyonumuz parametre olarak bir liste almaktadır. Fonksiyona parametre olarak gelen _liste,_ fonksiyon bloğu içerisinde bir _for()_ döngüsüne girecektir. Bu döngüde her bir liste elemanı içerisinde gezinip, değerinin _False_ olup olmadığı sorgulanmaktadır. Bu sorgu _if()_ yapısı içerisinde yapılmaktadır. > not item ifadesi _True_ ise if yapısına girilecek ve > return False ifadesi ile fonksiyondan çıkılacaktır. Girilmediği takdirde de > return True kodu ile fonksiyondan çıkılacaktır. Yani fonksiyonun _False_ döndürebilmesi için içerisinde bir tane bile _False_ değer olması yeterlidir. Şimdi de yazmış olduğumuz fonksiyonu çalıştıralım :  Fonksiyonu 2 adet liste üzerinde test ettik. İlk listemiz : > myList = [True, False, True, True, True] listesidir. İçerisinde bir adet _False_ değeri vardır. Bu durumda kendi tanımladığımız _hepsi()_ False değer döndürmelidir ki döndürdü de. İkinci tanımladığımız liste ise > myList2 = [True, True, True, True, True] listesidir. Tüm elemanları _True_ değere sahiptir ve bu durumda _hepsi()_ fonksiyonunun True değer döndürmesi gerekir. Döndürdü. _hepsi()_ fonksiyonunu şimdi de sayı değerleri üzerinde test edelim. Ancak öncelikle şunu belirteyim. Sayı değerleri, sıfır haricinde hep True döndürür, sadece 0(sıfır) değerinde False döndürür. Herhangi iki adet sayı listesi oluşturalım ve sonuca bakalım :  Görüldüğü gibi nagetif değerler de dahil tüm sayı değerleri True kabul edildiğinden ilk listemiz True döndürürken, içerisinde 0(sıfır) elemanı bulunan liste False değer döndürdü. Şimdi de bu değerleri _all()_ fonksiyonunun kendinde test edelim. Böylelikle kullanımını da görmüş oluruz :  _all()_ fonksiyonunun kullanımı örneklerde görüldüğü gibi oldukça basit. _all()_ fonksiyonunu, string diziler üzerinde de kullanabiliriz :  Örneklere baktığınızda eminim fark etmişsinizdir. string değerlerin içeriği dolu ise bu değerleri _True_ kabul ederken, içeriği boş olan string değer _False_ kabul edildiğinden sonuç False dönmüştür. Şimdilik bu kadar. Umarım faydalı bir çalışma olmuştur. Teşekkürler.  Kaynak belirtilmeyen görseller bana aittir. The pictures without source in the post is belong to me <hr><center><sub>Posted via <a href="https://www.marlians.com/">Marlians.com</a></sub></center>
author | elektroyazilim |
---|---|
permlink | all-fonksiyonu-python-dersleri-tutorials |
category | palnet |
json_metadata | {"tags":["palnet","zzan","stem","tr","programming","python","marlians"],"image":["https://cdn.steemitimages.com/DQmVqEHkajCZyuMfc1Nn7AfRj9QwYTddNmLcySkpi48PD1S/yeni.jpg","https://cdn.steemitimages.com/DQmPTdgBKbwUT5HDpmpDBzqmjmGXw1Rmvd8a6BiWfE1C3dT/image.png","https://cdn.steemitimages.com/DQmef8ZFRLzC9Dzydxn1hXHe6xsqycVPZvc57fzPv2yDYYa/image.png","https://cdn.steemitimages.com/DQmVgP4hd5FeCikMNqCBtJJiLCBpoNTVtxSD1Mh93BwpJUD/image.png","https://cdn.steemitimages.com/DQmTNVN3QG3T1xzHWjPXVU4ZvXgmgcjWK4pwb38reJxj8U4/image.png","https://cdn.steemitimages.com/DQmUv8B6j2s82SiGLxrKX8bzwdi91rUAj6DWHc7ek5Dgv8p/image.png","https://cdn.steemitimages.com/DQmYZw2bhUomeivJwQ8CiLaTzXTbJPLd1PsSGdcoEE1DfKP/yesilayrca.png"],"app":"marlians/0.1","format":"markdown"} |
created | 2019-08-14 18:06:51 |
last_update | 2019-08-14 18:06:51 |
depth | 0 |
children | 8 |
last_payout | 2019-08-21 18:06:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 10.111 HBD |
curator_payout_value | 3.200 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 3,617 |
author_reputation | 73,919,354,200,140 |
root_title | "all () Fonksiyonu - Python Dersleri (Tutorials)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 89,527,574 |
net_rshares | 39,589,618,877,544 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
turk | 0 | 93,666,155 | 50% | ||
talaxy | 0 | 329,018,715 | 10% | ||
sam99 | 0 | 5,556,217,859 | 2.3% | ||
melihkorkmaz | 0 | 111,417,616 | 100% | ||
joeparys | 0 | 1,295,795,469,298 | 21.05% | ||
accelerator | 0 | 7,215,726,438 | 0.23% | ||
imisstheoldkanye | 0 | 2,319,220,304 | 1% | ||
steinhammer | 0 | 591,278,863 | 20% | ||
mmmmkkkk311 | 0 | 1,244,885,922,172 | 27.64% | ||
baycan | 0 | 4,149,925,334 | 50% | ||
neokuduk | 0 | 13,718,034,726 | 100% | ||
literaturk | 0 | 3,313,800,214 | 100% | ||
minnowvotes | 0 | 20,748,997,861,278 | 96.06% | ||
sudefteri | 0 | 12,761,626,315 | 100% | ||
new.diak | 0 | 173,713,333 | 50% | ||
akifane | 0 | 2,566,077,763 | 100% | ||
rasit | 0 | 437,987,113 | 100% | ||
bid4joy | 0 | 130,718,158,122 | 28.57% | ||
maveraunnehr | 0 | 439,100,881 | 100% | ||
dailyhouston | 0 | 404,787,022 | 76.36% | ||
redlambo | 0 | 152,075,796,938 | 25% | ||
luckyvotes | 0 | 2,095,888,942,610 | 93.21% | ||
ezravandi | 0 | 4,698,242,102 | 2.6% | ||
brupvoter | 0 | 2,617,009,829,501 | 65.79% | ||
alfanso | 0 | 2,488,023,480,043 | 81.32% | ||
inciter | 0 | 5,109,267,891,795 | 63.26% | ||
informator | 0 | 1,968,238,494 | 13.82% | ||
soteyapanbot | 0 | 17,282,529,359 | 20% | ||
sevecen | 0 | 248,768,410 | 50% | ||
myrose | 0 | 248,604,017 | 50% | ||
oceansbot | 0 | 105,883,632 | 76.36% | ||
thebot | 0 | 767,768,565,407 | 78.25% | ||
trdaily | 0 | 2,843,403,173 | 100% | ||
bumut | 0 | 218,655,328 | 50% | ||
oceanwhale | 0 | 1,489,481,877,088 | 76.36% | ||
crabbot | 0 | 532,705,203 | 100% | ||
parakazan | 0 | 306,257,870 | 100% | ||
profitvote | 0 | 1,025,914,599,331 | 76.9% | ||
mozer | 0 | 1,501,727,037 | 30% | ||
whalepromobot | 0 | 138,690,653,338 | 33.33% | ||
laissez-faire | 0 | 66,063,131 | 100% | ||
ayisigi | 0 | 411,682,795 | 100% | ||
meowcliver | 0 | 131,825,636 | 50% | ||
kabasakal | 0 | 11,310,887,384 | 30% | ||
devsup | 0 | 28,789,348,089 | 7% | ||
maonx | 0 | 9,311,465,747 | 100% | ||
omeryetim | 0 | 100,446,096 | 30% | ||
hdu | 0 | 4,776,302,505 | 2% | ||
iskenderk | 0 | 17,129,699,385 | 100% | ||
yusufyusuf | 0 | 60,380,462,076 | 100% | ||
cocukgelisimi | 0 | 6,155,315,124 | 100% | ||
denizcakmak | 0 | 11,410,147,856 | 72% | ||
elektroyazilim | 0 | 41,733,895,573 | 100% | ||
artaxx | 0 | 234,051,003 | 50% | ||
iktisat | 0 | 937,008,479 | 100% | ||
filoq | 0 | 244,693,362 | 50% | ||
helping-aj | 0 | 291,730,196 | 100% | ||
mk-pal-token | 0 | 1,319,484,167 | 60.95% | ||
mk-stem-token | 0 | 3,917,810,642 | 100% | ||
mk-marlians-tkn | 0 | 2,011,136,574 | 72.07% | ||
ekitap | 0 | 299,761,527 | 100% |
You got a 28.57% upvote from @bid4joy courtesy of @elektroyazilim!
author | bid4joy |
---|---|
permlink | re-elektroyazilim-all-fonksiyonu-python-dersleri-tutorials-20190818t001121165z |
category | palnet |
json_metadata | {"app":"postpromoter/2.1.1"} |
created | 2019-08-18 00:11:21 |
last_update | 2019-08-18 00:11:21 |
depth | 1 |
children | 0 |
last_payout | 2019-08-25 00:11:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 67 |
author_reputation | 11,746,524,585,557 |
root_title | "all () Fonksiyonu - Python Dersleri (Tutorials)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 89,647,749 |
net_rshares | 0 |
You got a 65.79% upvote from @brupvoter courtesy of @elektroyazilim!
author | brupvoter |
---|---|
permlink | re-elektroyazilim-all-fonksiyonu-python-dersleri-tutorials-20190818t043612307z |
category | palnet |
json_metadata | {"app":"postpromoter/2.1.1"} |
created | 2019-08-18 04:36:54 |
last_update | 2019-08-18 04:36:54 |
depth | 1 |
children | 0 |
last_payout | 2019-08-25 04:36:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 69 |
author_reputation | 13,657,314,846,422 |
root_title | "all () Fonksiyonu - Python Dersleri (Tutorials)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 89,653,332 |
net_rshares | 0 |
You got a 21.05% upvote from @joeparys! Thank you for your support of our services. To continue your support, please follow and delegate Steem power to @joeparys for daily steem and steem dollar payouts!
author | joeparys |
---|---|
permlink | re-elektroyazilim-all-fonksiyonu-python-dersleri-tutorials-20190817t132823828z |
category | palnet |
json_metadata | {"app":"postpromoter/2.1.1"} |
created | 2019-08-17 13:28:24 |
last_update | 2019-08-17 13:28:24 |
depth | 1 |
children | 0 |
last_payout | 2019-08-24 13:28:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 204 |
author_reputation | 308,134,181,812,267 |
root_title | "all () Fonksiyonu - Python Dersleri (Tutorials)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 89,631,830 |
net_rshares | 0 |
You got a 93.21% upvote from @luckyvotes courtesy of @elektroyazilim!
author | luckyvotes |
---|---|
permlink | re-elektroyazilim-all-fonksiyonu-python-dersleri-tutorials-20190820t062622977z |
category | palnet |
json_metadata | {"app":"postpromoter/2.1.2"} |
created | 2019-08-20 06:26:24 |
last_update | 2019-08-20 06:26:24 |
depth | 1 |
children | 0 |
last_payout | 2019-08-27 06:26:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 70 |
author_reputation | 29,364,484,293 |
root_title | "all () Fonksiyonu - Python Dersleri (Tutorials)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 89,731,142 |
net_rshares | 0 |
You got a 92.90% upvote from @luckyvotes courtesy of @elektroyazilim!
author | luckyvotes |
---|---|
permlink | re-elektroyazilim-all-fonksiyonu-python-dersleri-tutorials-20190820t084723497z |
category | palnet |
json_metadata | {"app":"postpromoter/2.1.2"} |
created | 2019-08-20 08:47:24 |
last_update | 2019-08-20 08:47:24 |
depth | 1 |
children | 0 |
last_payout | 2019-08-27 08:47:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 70 |
author_reputation | 29,364,484,293 |
root_title | "all () Fonksiyonu - Python Dersleri (Tutorials)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 89,734,500 |
net_rshares | 0 |
You got a 96.06% upvote from @minnowvotes courtesy of @elektroyazilim!
author | minnowvotes |
---|---|
permlink | re-elektroyazilim-all-fonksiyonu-python-dersleri-tutorials-20190818t043513675z |
category | palnet |
json_metadata | {"app":"postpromoter/2.1.1"} |
created | 2019-08-18 04:35:15 |
last_update | 2019-08-18 04:35:15 |
depth | 1 |
children | 0 |
last_payout | 2019-08-25 04:35:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 71 |
author_reputation | -125,291,280,752 |
root_title | "all () Fonksiyonu - Python Dersleri (Tutorials)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 89,653,291 |
net_rshares | 0 |
You got a 25.00% upvote from @redlambo courtesy of @elektroyazilim! Make sure to use tag #redlambo to be considered for the curation post!
author | redlambo |
---|---|
permlink | re-elektroyazilim-all-fonksiyonu-python-dersleri-tutorials-20190819t034719743z |
category | palnet |
json_metadata | {"app":"postpromoter/1.9.2"} |
created | 2019-08-19 03:47:18 |
last_update | 2019-08-19 03:47:18 |
depth | 1 |
children | 0 |
last_payout | 2019-08-26 03:47:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 139 |
author_reputation | 123,143,757,359 |
root_title | "all () Fonksiyonu - Python Dersleri (Tutorials)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 89,687,467 |
net_rshares | 0 |
You got a 33.33% upvote from @whalepromobot courtesy of @elektroyazilim!
author | whalepromobot |
---|---|
permlink | re-elektroyazilim-all-fonksiyonu-python-dersleri-tutorials-20190818t003038272z |
category | palnet |
json_metadata | {"app":"postpromoter/2.0.0"} |
created | 2019-08-18 00:30:45 |
last_update | 2019-08-18 00:30:45 |
depth | 1 |
children | 0 |
last_payout | 2019-08-25 00:30:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 73 |
author_reputation | -231,775,391,844 |
root_title | "all () Fonksiyonu - Python Dersleri (Tutorials)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 89,648,103 |
net_rshares | 0 |