NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

variables -> Değişkenler
# data type -> yorum satırı
type() -> verilen değerin veri tipini söyler
int -> integer tam sayı demektir
float -> floating point kesirli ifade demek 3.14 2.30 vs..
Adlandırma örnek -> myFloat -> camelCase (deve gösterimi) my_float -> snake_case (yılan gösterimi)
pythonda 2 tam sayı bölünürse kesirli ifade çıkar örnek 4/2 -> float olur
üssü çarpma yapmak için 2**5 -> 2*2*2*2*2
bölmede kalanı elde etmek için % -> 10 % 3 = 1 (remainder) kalanı bulmak
-----------------------------------------------------------------------------------------------------------------
strings -> str metin isim vs....
name.capitalize() -> string ifadenin ilk harfini büyük yapar
name.count(saymak) ->verilen string ifadenin içinde ne kadar harf var şeklinde sorgu yapıyor name.count("a")
name.endswith(bunla bitiyor)->
name.find(bulmak) ->
name.upper ->(büyük harf haline getir) bütün harfleri büyük harf Yapar
name.index -> ilk verilen değerin ilk bulduğunda veriyor
name.split () -> bölmek
len(length) -> uzunluk örnek len(name)
n (new line) -> bir alt satıra geçer
escape characters -> kaçış karakteri
t -> tab -> tablık boşluk bırakır
slicing -> (dilimlemek),starting index, stopping index,stepping size
starting index:stopping index:stepping size
-----------------------------------------------------------------------------------------------------------------
lists -> birden fazla veriyi içinde tutar
immutable - immutability -> değiştirilemezlik özelliği stringler değiştirlemez sonradan myString[0] = "a"
mutable mutability -> değiştirilebilirlik özelliği listler değiştirilebilir myList[0] = 100 0.değer 100 oldu
myList.append () -> eklemek istedğiniz değeri ekler myList(20) list içersindeki son yere 20 değeri eklenir
myLİst.count () -> verdiğiniz değerin list içersinde varmı yok mu diye kontrol eder kaçtane varsa söyler
myList.index () -> verilen değer kaçıncı indexde onu söyler myList(40) = 5
myList.insert () -> eklemek buda ama istedğiniz yere ekleye biliyorsunuz myList.instert(2.30) 2 yere 30 değeri
myLİst.pop () -> son elamanı atar my_list.pop() = (1,2,3,4,5,6) 6 değeri burdan silinir
myList.remove () -> istediğiniz elemanı atart my_remove(5) (1,2,3,5,6) 5 burdan silinir
myList.revorse () -> listeyi tersine çevirir (1,2,3,4,5) revorse (5,4,3,2,1)
myList.sort () -> dizer mantık çevresinde büyükden küçüğe/ alfabetik şeklinde
örnek çalışma inputdan-> kullanıcdan veri isteme x = input("ismini gir) y = input("soy ismini gir) z = ("şifreni gir") print(x,y,z) kulanıcının girdiği değerler ekrana gelir ve bunlar string ifadelerdir
örnek çalışma append -> yenilist.append(x) yenList.append(y) yeniList.append(z) yeniList çalıştırdığımzıda listler ekranımıza gelir x 10 y 20 z 30
int -> stringe çevirmek örnek myInteger = 50 str(myInteger) "50" sayı sisteminde tabi stringe herşey dönüşür
string -> int çevirmek myString = "40" int(myString) 40 sayı sisteminde tabi
string -> Float float(myString) = 40.0 sayı sisteminde tabi
nestedList -> içe geçmiş listeler iç içe geçmiş liste listelerdir örnek myNestedList = [10,20,3.14,"atil",[1,2,3]] -> sonradan eklenen ler eleman olur myNestedList[0] = 10 myNestedList[1] = 20 myNestedList[2] = 3.14 myNestedList[3] = atil myNestedList[4] = [1,2,3]
yani 1,2,3 liste almak istedeğimizde smallList = myNestedList[4] Print smallList = [1,2,3] type(smalllist) = sonuç list olur type(smallList[0]) = myNestedList içindeki smallListin 0 daki elamının int olduğunu görmüş olduk
myNestedlist teki son elemaın 1 ci değerini ekrana getirmek için smallList[1] = 2 ekrana gelir ayrı bir listeyele uğraşmamak için myNestedList[4] [1] sonuç yine 2 olur
ÖRNEK lastList = ["a","b",["c","d","e"],"f"] kaç değer sorgula -> len(lastList) 4 e harfini getir -> lastList[2] [2]
ÖRNEK firstList = [10,20,30,40,50,60,70] bu listeyi 30 dan başlat -> firstList[2::] sonuç 30,40,50,60,70
5 i değere kadar yazdır 50 -> firstList[:5:] 10,20,30,40,50 1 er atlayak ekrana yazdır -> firstList[::2] 10,30,50,70 listlerde slicing özelliği burdada geçerli Listlerde olur
-----------------------------------------------------------------------------------------------------------------------
Dictionary -> sözlük #key - value paring
fitness_dictionary = {"banana":100,"apple":150} anahtar ve değer atanmıştır fitness_dictionary print banana': 100, 'apple': 150 type(fitness_dictionary) dict
dictionary.get -> almak fitness_dictionary.get("apple",0) yine apple değerini verir apple 150 ama yanlış yazılırsa fitness_dictionary.get("appl",0) sonuç olarak 0 verir
dicitionary.items ->
dictionary.keys -> dictionary.keys() anahatları verir banana apple
dictionary.pop ->
dictionary.popitem ->
dictionary.popitem ->
dictionary.setdefault ->
dictionary.update ->
dictionary.values -> dictionary.values() değerleri verir 100 150
değerleri liste çevirmek için list(fitness_dictionary.values()) 100,150 type list olur
verilen değer yanlış ise ve değiştirmek istiyorsam fitness_dictionary["banana"] = 200 print fitness_dictionary banana 200 olur
peki yeni değer eklemek istiyorsam fitness_dictionary["melon"] = 300
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.