GoogleAdsense

Bool and or etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Bool and or etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

14 Haziran 2021 Pazartesi

Python Lesson 07-Boolean_and_or

 https://github.com/Albatros46/PythonLesson2/blob/main/D07-Boolean_and_or.py

a=True
b=False
print(type(a))
print(type(b))

x=2
y=True
print(x>y# 2 fadesi 0 dan buyuk oldugu icin true deger donecektir.
age =33
bool1=age<20
print(bool1)
"""
Karsilastirma ifadeleri
<      -> 
<=     -> less than or equal
>      -> strictly greater than
>=     -> greater than equal
==     -> equal
!=     -> not equal
is     -> object identy
is not -> negated object identity
"""

ogra=['Ahmet','Mehmet','Akif','Jhon']
ogrb=['Ahmet','Mehmet','Akif','Jhon']
print(ogra == ogrb#true
print(ogra is ogrb ) #false - hafizada bulunan farkli yerleri teskil ettikleri icin false donecektir
print(ogra is not ogrb)

print(32 > 24 and 15 >10)
print(False or True)
print(False or False)
print(not False)

Python Lesson 13-Object_Oriented_1

  Python Lesson 13-Object_Oriented_1 #Nesne Yönelimli Python I, Nesne, Sınıf class   Car :  #araba class olusturuldu      pass car_1 = Car (...