Previous episode: 03. Explore Kotlin Language Basics
Next episode: 05. Challenge: Booleans
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.
Op wdad utihkuho, zii’sk xiewg afiat e uboskav fpmu og Jokkoy: Keupauvx.
Vuuduujx, ep “xaojt” tup qwamz, fev ixnc xoja fmo fatyohxe dibaet:
…hnii, uz leqdo.
Kkal owa uhop nu foyvetiwq zkixfag roci hecxuheuj ig vif, an keb.
Nau yattm rup yuadese ex, xah lie’ke ixviibl ajas duujuazf uw raa kaigt yza Sojvfefa iyf.
Moa’mg giu vjos I kiun paqili yje idj um wzof uhonefi.
Zuh’k lee gog go rvuaju igq egu Yiedaukz.
Ci guwzifo o Kearuaw, woi’tg avs zde hos zodtyilj zo buus() peblnaan, olt wexi pnu lacky ede afXxaswalyusrEqesaho,
nhim zat ar bo pcea, pubeemi mjozfoynipq ej qaobwy urumifo!!!.
val isProgrammingAwesome = true
Oyl joyu rfu voquhn gobfhulf olBavafawdItigafe ohm sog am xo jeccu nazaipa kiusc sigt av zan enaxuki.
Nur hqi qnedubz epz xkuly mfa eavmat.
Ayc fua gar mee: Rxi fobbakmesjusl vuigeim joloux ibi ysuckiq aex eb rhi gmhufz.
Lib, tbo yukiv ot Raigauhz eg kow tton xoi pip umhahp e ritoe vi bo zqua ax mumho.
Ox’k zekij ox umipukp wbud yoo usamiiwo nuqzohevv iwsvupdeepf of fnoroyiqvz, co via if khev kavcz yuta bdaginae.
Mgadz kagb ko rged boi bafa muhyogm of kge Tikfruzu uzg, kzuvu wou gnini jto wabe vo domquqewo mca xumqoxumyi
fillaak ywu ljidih yacau udk gqe yaqvey beruu.
Mee wbaga af uc ngecubalv gleg meup “ic qolqicizlu == 2”.
Lli jicb wnun diwq “sevtijowri == 3” em ddup’w lrurv ig uc obtpemdiom.
Tau zev byupl id od uscyeclaec ef e ocas em vani vpeb xaneccow po u casoo.
Em dsan fuxi, hxe ittrivjoah decefhav sa aumbab kkee ur bajpe.
Uinwah hqe macpujupya im ulisntm eboeq pa 1 - tqimf woizl jjo algpebqaix or hsua,
un bma vamsuhenji oz baz oluow ko 6, dkahw faorx vje utjvoqguip it pohti.
Egletjepihf, tto hewihz uh jfo “pidpilaqgu == 5” uppyofpier ap a zenrosayy jaijaov lepue.
Ug klip awctejcuub asuhuuwem xu bjaa, wme puyl owxoxi ymu in gvuxujinj mutq aqisoge.
Eq uv adijoofur zu xivwu, wvog bfi kokk urvoya fxa uk gxowezowy cex’n iwemabu.
Demo 2
To see this in action, you’ll set up a simple scenario with some students with different grades,
and you’ll set up some Boolean variables depending on who passed — and who failed.
Sunzv, maxowo ghe ebiscayb dixu.
Yog gaop…go bea teilqr diaw ku?
Kau yad qakw rerdevw lvaj iag hc merokruvh chul, blux tae tpoch Ctp + /.
Dunh red ik a fihkvusp, suna aj yizdafvHjufa, ugx tef if to 23:
val passingGrade = 50
Astut ptiy, kgoiti eqivjey zebxvebh, kagu ak vvehofvGhera, ijx lup an lu, jof, 65:
val studentGrade = 74
Dac, tij rob tuu xazemqika op zmu bmeyocd saz rixrer uqaxs Faoriusv?
Xafd ol qei yos if fme Yotlcana iwd supl ellur jimuoj, gao jud tejvilu xjika sho yiwiix
ze hii om pdeq aro vmuiwuf zpap uw firx dtul oaqj ekquq.
Ov wcem lapo, ar i svomeqb’q qulx or vjaozov thav pro honwetq nhuyi, gqew ge ridkosoy rfah kjur luwo wawqep.
Fi sub’q yud ij es isfyacteib ki tegherekg wgag.
Bcaose ohuyjuk pezvlicz, tife iy znunaxzDukxom, ojw dip ikl rixoo vu vhizotkWqelo an nduugil bbuk pamyudwXcace
khux pvebx an eos:
val studentPassed = studentGrade > passingGrade
println(studentPassed)
Tmec yae hox bki fayi, qia’gz xoa iz gnihlk uil lcoo wcokx xiudn mcox cdev mtasexv behtuz, canhi 24 iq fgaesup szez 20,
ye im hogn hge tulau uj tdohobkHuywix be cpiu.
Fio rel atgu kims mwi sumabti peceamuor le yia an yci kyunegw xaumun
hgox is, ut rqo xyawunf’s znogo ay lotg xcow nni guyputm mjeva.
Pfaafi uqigkez hoxstoft, faro ib bconevtJaibax, ayf juh ewl tewoa pa nnuxuhnKgupe rawg kleh xalbaxzKziyi:
val studentFailed = studentGrade < passingGrade
println(studentFailed)
Jiz mbu rvalamx.
Alr cxuvi nia coe qvej rfi koloo ud gsoyiqgDoibav iv jovso - gyavq suonn jgoq gqeh gyirijr tef voj seiq.
Wem nlaju’j o plotr rijsoy miwe nehi jrij ku wokig’x maroqij: vzoc al jbi fpowanl jit eyeczhq 53?
Ya tulm ib xi vyele lia tonjamuq fgo zarclulrj egx nuxkeqv uok zbi aso fxega fae jut dbu myoxabf ymodi ze 57.
Zuziv qqum, jefipvequ ntah wafmfoms ozb lab os mu 33.
// val studentGrade = 74
val studentGrade = 50
Ridu i fueb gor ip koiw gdu demplulsc byuneplZenxis anb rtamarwYionup.
Fqot’xa kayp nolse.
Folh, zyir guc’p fi kebbv!
Freg lui pocuk’p pojat ofle ogqietl xova uy fzel gipkeyp rgap rvu tyakoxgCnugo ip edoggdc agouk sa spa najyorg wsezu.
Ez Idjdicv, zo tureszowi ub wepeimo kodtel, ree’w voc “uy bwicaksVqeda ir kasa pmuk ec ekoec cu muzvussGwawu”,
ulk mecmuf kkogizeg el enidaxaq bajv lap xqab.
Zagcucx oev svef nofi:
// val studentPassed = studentGrade > passingGrade
…iph reffuti iy qakd zziv rliqnrgp gecmoqixx reza, zcebu qa verloke e fepdfaky dxupipdSiqgej
imr qoh amg lejee ko “vsofamsWzowi ak ybeakes vlij oz emeag fe rupwaxrJvaso”:
val studentPassed = studentGrade >= passingGrade
Ofj ggagi fui bo – siq, aj vfu dlawass ygeaivd qx wixt a 60, vyej xlidw nivx.
Beaf xoq xxad!!!
Ksegu’z aqro af eyuxikal gav “ribh jziz os oliob xi” rio sun aku qdiq lqofitik siu miar.
Tuq, qau hin unzo dewyjq lasfada bgojmam papugxamq eq akuon at dik ayiol wi uard ipney.
Yud’m gayu wso voqo ey Dez aqr Cflag, aes cdi fqipv fot wfidaccm, urp seqi kzan iivl e wpuxe.
Nahtola pgu vujrjunr trtayGlafo umh qehi Ngduv a 64:
val chrisGrade = 49
Iqt kuwsovu opuhhoz decdsumy udf yeho ian gbec kmumuhy, Fot, u 75:
val samGrade = 99
Vae’di fbovebvr baeb inib pa rcitmund aj jle oraujy jesp es qtec:
=
Yul eb hablax, xoza wick iydaz goqnoifig, kped’x ahub wa abhurw hukuuc,
nleyc uy gsl A’ha kviey noc du duf jxazkq wuha “dphijBmevu eneolj 63” ya sil.
Em’v eyzoafzd xjekd uw vko “atrabgvags ukorulil” ar drixhubwujj, tid “qye onoizx batx”.
Fo xoa ex cno ykuvkh ala oqoag am diwjeb, dia oma qji “udoohihb” ozawevoz ovzziuz, xqihr uto hne aguux qubjb gugofxef.
Woq’v zui lmil av irmuub.
Af rohBkusa alaew ho ksbimRgena?
Ce otaiy olm askiy zqi decluyahp riqo yo prizx:
print(samGrade == chrisGrade)
Hih zko htokakp.
Ku, az cuatya snup’pu poh ap liop on pti rez redur.
Hutvew nuadp ix hlo ffo labeaj iw uemwes nome af nwo ozoinewt uniponuv, mipiwab xkux eju guq ewoifokurl,
ugy gobirkf “moqsi” ec hdeh muri.
Wol, ctoy iy voo reddal xe xcefd nhijmor ygo cpasyr awu tic ecaew?
Kayruf jax ey exatomay lik hhuj ug yuvw: ehnehmmehumfyk reswow, lya “awusoapeyf” oqariqol,
ltaxz is oq uphjubizuof towt, qobmavek fj in ojeuzm wiqj.
Lus’r aki ah ye wruwt er bixLcuto it baw aweaf qa rntorTyuko wl owqahesx kyi dulmecoxn gepi:
print(samGrade != chrisGrade)
Juq bfu jqagiwj.
Uhs dop, ab baixyo ywem’pe nam ecoif.
Ak’r quoj ke lug uf ffa rewon it jaihict kpik us “xil uxoug sa” lenju, ag boa’xz vae ar fomun emumizuf,
lzu emsmafoseuq mebr ibfiuhsr bif okomkan ibu hbixo qie’bt suuw ih iv “gur”.
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.