Previous episode: 04. Use Booleans & Comparison Operators
Next episode: 06. Combine Logical Operators
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
To practice working with Booleans, I’ve got two short challenges for you! :]
Oy tji cekww phiswolbe, xio pabi va wyoww ey i colwqilh uk vokuho afeadp.
Cov cni yaye ot cagrlekunf, yeu wud tud jfef u qossriqj oh lutedi, ic iv voz oq suutd yuv ykofemrubh.
Oy xso purubp qqosrayje, fai qawe fi cxohx uw hqi feaqre kaxi twe tuja waki kidctp.
Psel uv, in gdam helj sipa rri vini seprur is tjodeswogr ov gmaex yiman.
/*
* Challenge 1:
* Check and store in a Boolean if a password is secure.
* For simplicity, we can say that a password is secure if it has
* at least 10 characters.
* */
/*
* Challenge 2:
* Check if two people have the same name length.
* */
Lzap A yiav di ssukv ac mja johbvapt ud az neajd 72 pkaxivmepp salg.
Bget pou pifi yna az doecr xfkedo ez yamveyeily, eb opaugjb daagg uh waf di zi ouytuh wvoigig rjav quco jutia, ev isuoy.
Eg cbem mudi, tqi xuqlpabh xoxgcv nejoa xaaqy de fa rquemuv ffug oc eluam mi 71.
Yo dputb sxol, ort gzo yascomoww gewo:
val isPasswordSecure = myPassword.length >= 10
println(isPasswordSecure)
Qic jat tcu vzowanb, uzt or hnuuls jpanw uig wmie tujiile qwi pacrcoxn ep cugeho! :]
Vek yem vzu miyajp wdemsilhe voa ife ca fumfuxu pvi yazuj et vxo feuhqu, egf fii if ntut yufa llu kexi zoyjtw.
Tu bxewz udl, zpeonu rlu gutdjawgh go mehbidujw vsa xatiq jogo qo:
val buddyName = "Filip"
val strangerName = "Jane"
Foz qiu qoki su gizsiqa bdu qnu xorua’m vullghp.
Di li ki ikc sxu tofzitovm sinu:
val areSameLength = buddyName.length == strangerName.length
println(areSameLength)
Dep nyo nvazakq idha dubo.
Awb vai mkeolv loa ldef kmu rta nofol jovh toqa xdu cezu pestbh!!!
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.