Sayısal veri türleri

Python'da Veri Tipleri

Jason Myers

Instructor

Yerleşik sayısal türler

Integer

  • Tam sayılar
  • Büyük değerler
int(123456789123456789)
123456789123456789

Float

  • Kesirli değerler (yaklaşık)
  • Bilimsel gösterim
float(123456789123456789)
1.2345678912345678e+17
Python'da Veri Tipleri

Decimal'lar

  • Tam hassasiyet
  • Para birimi işlemleri
from decimal import Decimal
Decimal('123456789123456789')
Decimal('123456789123456789')
Python'da Veri Tipleri

Float yazdırma

print(0.00001)
1e-05
print(f"{0.00001:f}")
0.000010
Python'da Veri Tipleri

Float yazdırma

print(f"{0.0000001:f}")
0.000000
print(f"{0.0000001:.7f}")
0.0000001
Python'da Veri Tipleri

Python bölme türleri

4/2
2.0
4//2
2
7//3
2
Python'da Veri Tipleri

Hadi pratik yapalım!

Python'da Veri Tipleri

Preparing Video For Download...