From 5c8e8e723a6da5fcab935dfd7ca383c6d3b210c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Sun, 23 Jun 2024 16:41:26 +0300 Subject: [PATCH] =?UTF-8?q?match=20ve=20pass=20i=C5=9Flendi,=20ko=C5=9Ful?= =?UTF-8?q?=20operat=C3=B6r=C3=BC=20sayfa=20138?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 6 ++++++ python/match.py | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 python/match.py diff --git a/ChangeLog b/ChangeLog index 129dc95..d5ebf94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-06-23 hwpplayer1 + + * python/match.py: match example + + * python/Python.pdf: Koşul operatörü sayfa 138 + 2024-06-17 hwpplayer1 * python/Python.pdf: CSD (PSD) shell example written page 133 diff --git a/python/match.py b/python/match.py new file mode 100644 index 0000000..afe0935 --- /dev/null +++ b/python/match.py @@ -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')