Swift Switch Case Nedir ? Nasıl kullanılır ?(VIDEO TUTORIAL) LESSON-VI

in utopian-io •  7 years ago  (edited)

Selamlar , bugünkü dersimizin konusu Switch Case . Bu dersimizi tam olarak izleyen kişi , Switch Case nedir , Switch Case kullanımı hakkında tam bilgi sahibi olacaktır . Switch case her programlama dilinde mevcuttur . Swift programlama dilindede önemli bir yer almaktadır . İyi seyirler , iyi dersler .

Greetings, Switch case is the topic of today's lesson. The person who follows this course precisely is the Switch Case, and will have full knowledge of the use of the Switch Case. Switch case is available in every programming language. Swift has an important place in the programming language. Good looking, good lessons.

Projemizin Kodları
(Project Code)


import UIKit

### **// Switch - case yapısı**

**// not aralığına göre harf notu verme**

// 90 - 100 :AA 80-89:BA 70-79:BB 60-69:CB 50-59:CC 40-49:DD 0-39:FF

//if -else

var not = -20

//if not >= 0 && not <= 39{

//    print("FF")

//} else if not >= 40 && not <= 49{

//    print("DD")

//} else if not >= 50 && not <= 59{

//    print("CC")

//}else if not >= 60 && not <= 69{

//    print("CB")

//}else if not >= 70 && not <= 79{

//    print("BB")

//}else if not >= 80 && not <= 89{

//    print("BA")

//} else if not >= 90 && not <= 100{

//    print("AA")

//} else{

//    print("Girilen not değeri geçerli değildir")

//}

//Switch Case

switch not {

case 0...39:

    print("FF")

case 40...49:

    print("DD")

case 50...59:

    print("CC")

case 60...69:

    print("CB")

case 70...79:

    print("BB")

case 80...89:

    print("BA")

case 90...100:

    print("AA")

    

default:

    print("Girilen not değeri geçerli değildir")

    

}

**// For in ile Switch case kullanımı**

var sehirler = ["Adana","Ankara","İzmir","İstanbul"]

for sehir in sehirler{

    

    switch sehir {

    case "Adana":

        print("Adliyesi ile meşhurdur")

    case "Ankara":

        print("Başkenttir")

    case "İzmir":

        print("Egenin incisi")

    case "İstanbul":

        print("Gezilebilecek en iyi şehir")

        

    default:

        print("Geçerli bir şehir ismi girilmedi")

    }


  • Video ya ingilizce çeviri yapana " 1 SBD " Ödül verilecektir

  • The person who makes video or english translation will be awarded "1 SBD".

Videoma ingilizce çeviri yapabilirsiniz
English subtitles can be added to the video.

Kodlara github adresimden'de ulaşabilirsiniz
You can access the code file from my "Githup" account



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

I thank you for spending time with me.

Hey @kerimcaglar I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x