Skip to content
All Notes of My Python Journey
Introduction to Statistics in Python
Run the hidden code cell below to import the data used in this course.
print(18 % 7)
print(4 ** 2)
% kalanı veriyor, ** üstel çarpım
print("I started with $" + str(savings) + " and now have $" + str(result) + ")
Hidden output
aralara yazdığımız str(savings) ve str(result) gibi stringler daha önce tanımladığımız variablelardan çekilecek.
Run cancelled
areas = ["hallway",hall,"kitchen",kit, "living room", liv,"bedroom", bed, "bathroom", bath]
yukarıdaki şekilde list oluşturulur areas = [ ] köşeli parantez kullanılır
house = [["hallway", hall],
["kitchen", kit],
["living room", liv],
["bedroom",bed],
["bathroom",bath]]
Hidden output
double square brackets ile list of lists oluşturulur, birden fazla listeyi listeleyeceksek [[ ]] kullanılır
Run cancelled
x = ["a", "b", "c", "d"]
x[1]
x[-3] # same result!
downstairs = areas[0:6]
upstairs = areas[6:10]
# ya da
downstairs = areas[:6]
upstairs = areas[6:]
## SUBSET Bu şekilde subset alınabilir
Run cancelled
areas_1 = areas + ["poolhouse",24.5]
Listeye bu şekilde ekleme yapılabilir "+" ve [ ] kullanarak
Run cancelled
x = ["a", "b", "c", "d"]
del(x[1])
Silme işlemini bu şekilde yapabiliyoruz del()