create account

sum() ve pow() fonksiyonları - Python Dersleri (Tutorials) by elektroyazilim

View this thread on: hive.blogpeakd.comecency.com
· @elektroyazilim ·
$15.78
sum() ve pow() fonksiyonları - Python Dersleri (Tutorials)
![yeni.jpg](https://cdn.steemitimages.com/DQmVqEHkajCZyuMfc1Nn7AfRj9QwYTddNmLcySkpi48PD1S/yeni.jpg) 

Merhabalar

Python programlama derslerinin bu bölümünde sayılar üzerinde işlem yapan fonksiyonlardan devam edeceğiz.

Bu derse kadar gördüğümüz fonksiyonları hatırlayalım.

* _bin()_ ve _hex()_ fonksiyonlarını görmüştük. Bu iki fonksiyondan _bin()_ fonksiyonu ondalık tabandaki bir sayıyı 2lik tabana çevirmek için kullanılırken, _hex()_ fonksiyonu ondalık tabandaki bir sayıyı 16lık tabana çevirmek için kullanılıyordu.

* _abs()_ fonksiyonu, Matematik dersinden bildiğimiz _mutlak değer_ alma işlemini yapıyordu.

* _round()_ fonksiyonu da aynı şekilde gerçek hayatta kullandığımız sayıları yuvarlama işlemi yapıp, iki tür kullanımı vardı : tek parametreli ve çift parametreli.

* _min()_ ve _max()_ fonksiyonları da içerisine girilen sayı dizilerinin minumum ve maximum değerlerini buluyordu. Bu fonksiyonlar çoklu eleman alabileceği gibi içerisine demet veya liste türünden değişken de alabilirler.

Şimdi de _sum()_ fonksiyonuna bakalım.

## sum() fonksiyonu

_sum()_ fonksiyonu adından da anlaşılacağı üzere bir dizi içerisindeki değerlerin toplamını alır. Ancak dikkat edilmesi gereken nokta, dizi ifadesi.

_sum()_ fonksiyonu içerisine iterasyon yapılabilecek değerler alır. Yani demet, liste veya herhangi bir dizisel yapı olabilir.

Siz iterasyon edilmeyen iki değeri verirseniz aşağıdaki gibi bir hata alırsınız :

![](https://cdn.steemitimages.com/DQmQhhwk47HghsB6XxwiaD5gJPv5uan8EPJyHV6zqFw4QSJ/image.png)

_sum()_ fonksiyonunun doğru kullanım aşağıdaki gibidir :

![](https://cdn.steemitimages.com/DQmbs5U8N79TNghCt3QbHm5bKuaiTTz9DgRZY1wkwQ64aCF/image.png)

_sum()_ fonksiyonunu kullanırken vereceğiniz liste veya demet'in elemanlarının hepsinin sayı olmasına dikkat edin. Aksi takdirde hata ile karşılaşırsınız.

![](https://cdn.steemitimages.com/DQmTKc7jUk3Bse1mWbgjNVU3p1yaCrTQck8Dat7KTEEcE7Y/image.png)

_sum()_ fonksiyonuna vereceğiniz liste sayı olduğu sürece karışık olmasında herhangi bir sıkıntı bulunmuyor. İçeriğinde ondalık sayılar ve tam sayılar olabilir :

![](https://cdn.steemitimages.com/DQmPXuH3BvLBU9wNa4zW8X1vMBnHTxY6ST91HAm9jhCuvAg/image.png)

Son olarak da çok kullanıldığını düşünmediğim bir fonksiyondan bahsedelim : _pow()_ fonksiyonu

## pow() fonksiyonu

Bu fonksiyon herhangi bir sayının üssünü almak için kullanılır. Çok kullanılmayacağını düşünmemin sebebi zaten aynı işi yapan bir operatörümüzün olması.

Aşağıdaki örneklere bakarsanız ne demek istediğim daha iyi anlaşılacaktır :

![](https://cdn.steemitimages.com/DQmTHw9gcExXvtYUzUCdw87eckcTuf2cK6Rh4o8a8DbSnLQ/image.png)

Görüldüğü gibi bu fonksiyonun ilk aldığı parametre taban sayısını ikinci aldığı parametre de üs sayısını vermektedir.


Şimdilik bu kadar.

Umarım faydalı bir çalışma olmuştur.

Teşekkürler.

![yesilayrca.png](https://cdn.steemitimages.com/DQmYZw2bhUomeivJwQ8CiLaTzXTbJPLd1PsSGdcoEE1DfKP/yesilayrca.png)

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>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorelektroyazilim
permlinksum-ve-pow-fonksiyonlari-python-dersleri-tutorials
categorypalnet
json_metadata{"tags":["palnet","zzan","stem","tr","programming","python","marlians"],"image":["https://cdn.steemitimages.com/DQmVqEHkajCZyuMfc1Nn7AfRj9QwYTddNmLcySkpi48PD1S/yeni.jpg","https://cdn.steemitimages.com/DQmQhhwk47HghsB6XxwiaD5gJPv5uan8EPJyHV6zqFw4QSJ/image.png","https://cdn.steemitimages.com/DQmbs5U8N79TNghCt3QbHm5bKuaiTTz9DgRZY1wkwQ64aCF/image.png","https://cdn.steemitimages.com/DQmTKc7jUk3Bse1mWbgjNVU3p1yaCrTQck8Dat7KTEEcE7Y/image.png","https://cdn.steemitimages.com/DQmPXuH3BvLBU9wNa4zW8X1vMBnHTxY6ST91HAm9jhCuvAg/image.png","https://cdn.steemitimages.com/DQmTHw9gcExXvtYUzUCdw87eckcTuf2cK6Rh4o8a8DbSnLQ/image.png","https://cdn.steemitimages.com/DQmYZw2bhUomeivJwQ8CiLaTzXTbJPLd1PsSGdcoEE1DfKP/yesilayrca.png"],"app":"marlians/0.1","format":"markdown"}
created2019-08-16 18:15:30
last_update2019-08-16 18:15:30
depth0
children9
last_payout2019-08-23 18:15:30
cashout_time1969-12-31 23:59:59
total_payout_value11.961 HBD
curator_payout_value3.814 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,124
author_reputation73,919,354,200,140
root_title"sum() ve pow() fonksiyonları - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,606,232
net_rshares47,386,856,055,544
author_curate_reward""
vote details (65)
@bid4joy ·
re-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t164909862z
You got a 40.00% upvote from @bid4joy courtesy of @elektroyazilim!
properties (22)
authorbid4joy
permlinkre-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t164909862z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-19 16:49:09
last_update2019-08-19 16:49:09
depth1
children0
last_payout2019-08-26 16:49:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length67
author_reputation11,746,524,585,557
root_title"sum() ve pow() fonksiyonları - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,710,482
net_rshares0
@brupvoter ·
re-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t233227553z
You got a 65.66% upvote from @brupvoter courtesy of @elektroyazilim!
properties (22)
authorbrupvoter
permlinkre-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t233227553z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-19 23:32:27
last_update2019-08-19 23:32:27
depth1
children0
last_payout2019-08-26 23:32:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length69
author_reputation13,657,314,846,422
root_title"sum() ve pow() fonksiyonları - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,721,925
net_rshares0
@edensgarden ·
re-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190822t013708955z
Thanks for using @edensgarden!
properties (22)
authoredensgarden
permlinkre-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190822t013708955z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-22 01:37:09
last_update2019-08-22 01:37:09
depth1
children0
last_payout2019-08-29 01:37:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length31
author_reputation-100,797,867,719
root_title"sum() ve pow() fonksiyonları - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,806,013
net_rshares0
@joeparys ·
re-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t082103701z
You got a 30.77% 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!
properties (22)
authorjoeparys
permlinkre-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t082103701z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-19 08:21:03
last_update2019-08-19 08:21:03
depth1
children0
last_payout2019-08-26 08:21:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length204
author_reputation308,150,391,439,389
root_title"sum() ve pow() fonksiyonları - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,694,223
net_rshares0
@luckyvotes ·
re-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190822t031632881z
You got a 93.19% upvote from @luckyvotes courtesy of @elektroyazilim!
properties (22)
authorluckyvotes
permlinkre-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190822t031632881z
categorypalnet
json_metadata{"app":"postpromoter/2.1.2"}
created2019-08-22 03:16:33
last_update2019-08-22 03:16:33
depth1
children0
last_payout2019-08-29 03:16:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length70
author_reputation29,364,484,293
root_title"sum() ve pow() fonksiyonları - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,808,226
net_rshares0
@minnowvotes ·
re-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t222304474z
You got a 93.89% upvote from @minnowvotes courtesy of @elektroyazilim!
properties (22)
authorminnowvotes
permlinkre-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t222304474z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-19 22:23:03
last_update2019-08-19 22:23:03
depth1
children0
last_payout2019-08-26 22:23:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length71
author_reputation-125,291,280,752
root_title"sum() ve pow() fonksiyonları - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,720,439
net_rshares0
@redlambo ·
re-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190820t034505539z
You got a 100.00% upvote from @redlambo courtesy of @elektroyazilim! Make sure to use tag #redlambo to be considered for the curation post!
properties (22)
authorredlambo
permlinkre-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190820t034505539z
categorypalnet
json_metadata{"app":"postpromoter/1.9.2"}
created2019-08-20 03:45:06
last_update2019-08-20 03:45:06
depth1
children0
last_payout2019-08-27 03:45:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length140
author_reputation123,143,757,359
root_title"sum() ve pow() fonksiyonları - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,727,380
net_rshares0
@steemyoda ·
re-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t150337479z
The force is with you! You got a 25.91% upvote from @steemyoda courtesy of @elektroyazilim!

http://ultraimg.com/images/2018/02/27/n8qb.gif
properties (22)
authorsteemyoda
permlinkre-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t150337479z
categorypalnet
json_metadata{"app":"postpromoter/2.0.0"}
created2019-08-19 15:03:42
last_update2019-08-19 15:03:42
depth1
children0
last_payout2019-08-26 15:03:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length140
author_reputation-1,181,563,121,002
root_title"sum() ve pow() fonksiyonları - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,706,903
net_rshares0
@whalepromobot ·
re-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t025039262z
You got a 33.33% upvote from @whalepromobot courtesy of @elektroyazilim!
properties (22)
authorwhalepromobot
permlinkre-elektroyazilim-sum-ve-pow-fonksiyonlari-python-dersleri-tutorials-20190819t025039262z
categorypalnet
json_metadata{"app":"postpromoter/2.0.0"}
created2019-08-19 02:50:42
last_update2019-08-19 02:50:42
depth1
children0
last_payout2019-08-26 02:50:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length73
author_reputation-231,775,391,844
root_title"sum() ve pow() fonksiyonları - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,686,104
net_rshares0