match ve pass işlendi, koşul operatörü sayfa 138

This commit is contained in:
Mert Gör 🇹🇷 2024-06-23 16:41:26 +03:00
parent 5ca609fba6
commit 5c8e8e723a
Signed by: hwpplayer1
GPG Key ID: 03E547D043AB6C8F
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2024-06-23 hwpplayer1 <hwpplayer1@debian>
* python/match.py: match example
* python/Python.pdf: Koşul operatörü sayfa 138
2024-06-17 hwpplayer1 <hwpplayer1@debian> 2024-06-17 hwpplayer1 <hwpplayer1@debian>
* python/Python.pdf: CSD (PSD) shell example written page 133 * python/Python.pdf: CSD (PSD) shell example written page 133

13
python/match.py Normal file
View File

@ -0,0 +1,13 @@
s = input('Bir renk giriniz:')
match s:
case 'kırmızı':
print('red')
case 'mavi':
print('blue')
case 'yeşil':
print('üç')
case 4:
print('green')
case _:
print('another color')