match example 2

This commit is contained in:
Mert Gör 🇹🇷 2023-05-21 11:32:51 +03:00
parent ba6c5f32c0
commit d98fb246b9
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

14
match.example.2.py Normal file
View File

@ -0,0 +1,14 @@
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')