more if examples

This commit is contained in:
Mert Gör 🇹🇷 2023-05-20 07:17:59 +03:00
parent 0b8a159a9b
commit faabeabea5
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
2 changed files with 27 additions and 0 deletions

11
elif-2.py Normal file
View File

@ -0,0 +1,11 @@
a = int(input('Bir sayı giriniz:'))
if a == 1:
print('Bir')
elif a == 2:
print('İki')
elif a == 3:
print('Üç')
elif a == 4:
print('Dört')
else:
print('Diğer')

16
true-false-else-if.py Normal file
View File

@ -0,0 +1,16 @@
a = int(input("Bir değer giriniz:"))
if a:
print('Doğru')
else:
print('Yanlış')
b = []
if b:
print('Doğru')
else:
print('Yanlış')
s = input('Bir yazı giriniz:')
if s:
print('Doğru')
else:
print('Yanlış')